Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
A function that is called when an error occurs.
A function that is called when a button is clicked.
A function that is passed as an argument to another function and is called when the first function has finished executing.
A function that is used to generate random numbers.
The global object
The parent object
The current object
The child object
There is no difference between a function declaration and a function expression.
A function declaration is hoisted to the top of the scope, while a function expression is not hoisted.
A function expression is hoisted to the top of the scope, while a function declaration is not hoisted.
A function declaration can only be used inside of an object, while a function expression can be used anywhere.
What is the output of the following code?
console.log(typeof null);
string
number
object
null
There is no difference between let and var.
let is block-scoped, while var is function-scoped.
var is block-scoped, while let is function-scoped.
let can only be used to declare global variables.
for loop
while loop
do-while loop
if statement
To refer to the global object.
To refer to the parent object.
To refer to the child object.
To refer to the current object.
To define the arguments for the function.
To declare a variable.
To exit the function and return a value.
To create a loop.
Which of the following is not a valid way to declare a variable in JavaScript?
var myVar = 5;
let myVar = 10;
const myVar = "hello";
myVar = true;
There is no difference between null and undefined.
null is a value that represents an empty object reference, while undefined is a value that represents an uninitialized variable.
undefined is a value that represents an empty object reference, while null is a value that represents an uninitialized variable.
null and undefined both represent an uninitialized variable.