Public Questions for tag [javascript-array]

Ask Question

JavaScript array is used to store different elements or items. JavaScript array is often used when we want to store a list of elements or items and access them by a single variable. Unlike most other programming languages where the array is a reference to the multiple variables, but in JavaScript array is a single variable that stores multiple elements.

2 questions


0

Vote

4

Answers

54

View

What is the short and efficient way to find out if a JavaScript array contains a value?This is the only way I know to do it in JavaScript array:function contains(x, obj) { for (var i = 0; i < x

Jan 04

0

Vote

1

Answers

29

View

I have a javascript array of numbers and I add numbers elements in an array using the push() method. Is there any simple way to remove a specific item or ​element from a javascript array?I'm lo

Dec 20