Software Engineer at InVision. Full-Stack JavaScript dev, with passion for front-end development.
Psytrance DJ on weekends, playing in local clubs (yeah, that means: Goa Parties!) :D
Hi, I'm John Samuel Obinna, Full-stack developer, proficient in Web technologies with over 5 years of experience developing scalable distributed applications
Nice article.
I have one correction for you.
The line:
if(array.indexOf(4) >= -1 )
Needs to be:
if(array.indexOf(4) > -1 )
In order to check, whether an element is in the array. Otherwise the condition would always be true.
Yeah. indexOf() always return -1 if element is not found. Thanks Jonas