Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Object JavaScript - Using an array
var x = myFlowers.length; // the number of elements in myFlowers
var y = myFlowers.indexOf("Carnation"); // the index position of "Carnation"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment