Page 1 of 1

JavaScript, return index of an element in array

Wojtek on array, bug, fix, ie, index, indexOf, JavaScript · 30.08.2010 · Comments · 1 min read

Recently I’ve been working on a project with HTML5's <video> tag event handling and I needed to check if an element exists in the array. Quick googling resulted in neat native JavaScript method Array.indexOf. It returns the first index at which a given element can be found in an array, or -1 if it is not... Read more »

Page 1 of 1

All your code are belong to us

All your code are belong to us

Thoughts, stories and ideas on code and technology in general.
Blog title inspired by this meme

Search

Recent posts

  • Configure local website on WSL2 with PHP and nginx 5 months ago
  • Upgrade Raspbian from Jessie to Stretch 10 months ago
  • Install any version of NodeJS and npm on Raspberry Pi 10 months ago
  • VueJS pass data and methods to child component a year ago
  • Check laptop battery health on Windows 10 2 years ago
  • Custom linting rules in NuxtJS and eslint 2 years ago
All your code are belong to us © 2021
Proudly published with Ghost. Theme: Strider by Mataba and SixBytesUnder.