Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
An operator that combines two or more arrays into a single array
An operator that assigns a new value to a variable
An operator that creates a new object with a specified prototype object and properties
An operator that allows an iterable object to be expanded into individual elements
To specify a function's input parameters
To store a function's local variables
To create a new array of arguments passed to a function
To access all arguments passed to a function as an array-like object
A parameter that is required for a function to work properly
A parameter that has a default value if no value is provided
A parameter that is ignored by a function
A parameter that is used to specify the number of times a function should be executed
What is the output of the following code snippet?
function myFunction(x, y) {console.log(x + y);}myFunction(2, 3, 4);
5
9
11
Error
To refer to the current object
To refer to the previous object
To refer to the next object
To refer to a global variable
To declare variables inside a function
To specify a function's name
To return a value from a function
var x = 2;function myFunction() {var x = 3;console.log(x);}myFunction();console.log(x);
2, 3
3, 2
2, 2
3, 3
A function that returns a boolean value
A function that takes another function as an argument or returns a function as a result
A function that performs a specific task
A function that is called when an event occurs
function myFunction(x) {return function(y) {return x + y;};}var addFive = myFunction(5);var result = addFive(10);console.log(result);
10
15
20
Synchronous functions block the main thread of execution, while asynchronous functions do not block the main thread
Asynchronous functions are faster than synchronous functions
Synchronous functions can be called from anywhere in the code, while asynchronous functions must be called with a callback function
Synchronous functions can handle multiple tasks at once, while asynchronous functions can only handle one task at a time