My snippet looks something like this:
let go = "hello";
let col =["12","hello","14","15"];
let f = _.some(col,go);
I want to check whether the go value is present in col TRUE/FALSE. When I run this I get , f=false? How can I fix this or how to check the presence of a string in an array of strings (with lodash)?
Should work
let go = "hello";
let col =["12","hello","14","15"];
let f = _.includes(col,go);