Andy5
Andy5

Reputation: 2405

Javascript underscore every always return false

I am using the every function from the underscore library but it always returns false

. _every( Anarrayid, (key) =>{
                  mydataset.has(key)});

I have an array that contains Ids and a set that also has a collection of ids but returns false. I have tried comparing as sets but again same problem.

Can anyone help?

Upvotes: 0

Views: 171

Answers (1)

ryan
ryan

Reputation: 1084

I think the correct way is the following:

_.every( Anarryid, key => mydataset.has(key) )

Upvotes: 1

Related Questions