You are viewing a single comment's thread. Return to all comments →
using javascript
let stringListOb = {}; let queryListOb = {};
stringList.forEach(st=>{ stringListOb[st] = (stringListOb[st] || 0)+1; }) queries.forEach(q=>{ if(stringListOb[q]){ queryListOb[q] =stringListOb[q] }else{ queryListOb[q] = 0 } }) return Object.values(queryListOb);
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
using javascript
let stringListOb = {}; let queryListOb = {};