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 -

Why am I getting Internal .NET Framework Data Provider error 1025 when passing Method to where? -

linux - phpmyadmin, neginx error.log - Check group www-data has read access and open_basedir -