lenghth aof array js code example
Example 1: js string contais
const string = "foo";
const substring = "oo";
console.log(string.includes(substring));
Example 2: javascript dedupe array
const names = ['John', 'Paul', 'George', 'Ringo', 'John'];
let x = (names) => names.filter((v,i) => names.indexOf(v) === i)
x(names); // 'John', 'Paul', 'George', 'Ringo'