Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
// This is a comment
/* This is a comment /
# This is a comment
number
string
array
tuple
What is the output of the following program?
console.log(typeof "hello");
boolean
undefined
What is the output of the following code snippet?
console.log("hello".indexOf("l"));
1
2
3
4
console.log("hello".length);
hello
5
null
console.log(3 === "3");
0
console.log("hello".toUpperCase());
HELLO
hElLo
if (typeof myArray === "array") {}
if (myArray.isArray()) {}
if (myArray === "Array") {}
if (Array.isPrototypeOf(myArray)) {}
myArray.push(newElement);
myArray.add(newElement);
myArray.insert(newElement, myArray.length);
myArray[myArray.length] = newElement;
var myArray = ();
var myArray = [];
myArray = array();
myArray = {};