Open DancingPotatoes opened 2 years ago
This is very hard to debug. What's in args
? Can you give an example of the pokemon lists?
What you've done here is assigned your array to the pokemons
property on the exports
object:
exports.pokemons = [ pokemon lists ]
When importing a module, it's
export
object is what you receive, so you'll need to access thepokemons
property from the imported object to actually get the array you intended to work with. So you'll want something like (for ES6+):const { pokemons } = require('../../arrays/pokemons.js') const poss = stringSimilarity.findBestMatch(args, pokemons)
How is this an issue? The is skill problem. The author don't understand how exports
work.
I am pretty sure I did it correctly I have the first as a string and the second as an array the code is
arrays file