javascript - match an item in an array instead of doing a for loop -


here code

for(y=0;y<json.parse(sessionstorage.getitem("url")).length;y++){     if(json.parse(sessionstorage.getitem("url"))[y] != olistitem.get_item('privacystatementurls').get_url()){          listurl.push(olistitem.get_item('privacystatementurls').get_url());                             } } 

it goes through array see if there match item in list. there inbuilt function in javascript can use match if identical. he match he not hel hell hello etc


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -