Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
myArray[elementIndex]
elementIndex.myArray
myArray[elementValue]
myArray[elementIndex][elementValue]
if (typeof myArray === "array") {}
if (myArray.isArray()) {}
if (myArray === "Array") {}
if (Array.isPrototypeOf(myArray)) {}
What is the output of the following code snippet?
console.log(5 > 2 && 2 < 4);
1
0
null
undefined
console.log("hello".slice(1, 3));
hel
el
llo
Math.floor(number);
Math.round(number);
Math.ceil(number);
All of the above
console.log(2 * "3");
5
6
9
23
myArray.removeLast();
myArray.pop();
myArray.delete(myArray.length);
myArray[myArray.length] = null;
myArray.push(newElement);
myArray.add(newElement);
myArray.insert(newElement, myArray.length);
myArray[myArray.length] = newElement;
What is the output of the following program?
console.log(typeof "hello");
number
string
boolean
console.log("hello".indexOf("l"));
2
3
4