











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












reducer function on each element of the array, resulting in a single output value. It is particularly useful for accumulating values, such as summing numbers or concatenating strings.
JavaScript ES6, allowing for modular and reusable code.
represents the intentional absence of any object value, while '0' is a number.
d) The function that is currently being processed.
that owns the currently executing code, and its value is determined by how the function is called.
which takes an iterable of promises as an input, and it is resolved when all of the promises are resolved, or rejected if any promise is rejected.
function on every element in the calling array but does not return a new array; it returns 'undefined'.
single event listener to manage all events of a particular type for child elements, which helps in managing dynamic elements and improves performance.
JavaScript engine, allowing JavaScript to be run on the server-side.
once for each element in an array, in order, and creates a new array with the results.
return a Promise, simplifying the syntax for working with promises and asynchronous code.
Rationale: JavaScript is a loosely typed language, meaning variables do not have a fixed data type. Multiple Choice: Which function is used to output data to the console in JavaScript? a) print() b) log() c) write() d) console.log()
Rationale: console.log() is commonly used to display output in the console. Fill-in-the-Blank: The process of combining two or more arrays in JavaScript is known as __.
Rationale: Concatenation is the process of joining arrays together in JavaScript. True/False: In JavaScript, the === operator performs type coercion.
Rationale: The === operator in JavaScript performs strict comparison without type coercion.
Multiple Choice: Which statement correctly defines a JavaScript function? a) Functions are objects b) Functions cannot return values c) Functions can only be declared within loops d) Functions do not accept parameters
Rationale: In JavaScript, functions are first-class objects. Fill-in-the-Blank: The process of stopping the further propagation of an event in JavaScript is called __.
Rationale: The event.stopPropagation() method prevents the propagation of an event in JavaScript. True/False: JavaScript is a synchronous language by default.
Rationale: JavaScript is single-threaded and synchronous by default. Multiple Choice: Which statement about arrow functions in JavaScript is correct? a) Arrow functions do not have a 'this' keyword b) Arrow functions cannot accept arguments
Rationale: The push() method adds an element to the end of an array in JavaScript. Fill-in-the-Blank: The process of executing the same block of code repeatedly in JavaScript is known as __.
Rationale: Looping is used to repeat a block of code multiple times in JavaScript. True/False: JavaScript allows for multiple inheritance.
Rationale: JavaScript does not support multiple inheritance, as a class can only inherit from one other class.
Rationale: The concat() method is used to merge two or more arrays, returning a new array containing the combined elements.
const a = [1, 2, 3]; const b = a; b.push(4); console.log(a); a. [1, 2, 3] b. [1, 2, 3, 4] c. [4, 1, 2, 3] d. [1, 2, 3, undefined]Rationale: Arrays in JavaScript are objects and are passed by reference, so b and a point to the same array.
Rationale: In JavaScript, the type of undefined is 'undefined', and the type of null is 'object' due to a historical bug.
Rationale: JSON.parse(string) is used to convert a JSON string into a JavaScript object.
Rationale: 'let' is used to declare variables that are limited to the scope of a block statement.
Rationale: The slice() method returns a shallow copy of a portion of an array into a new array object.
Rationale: The delete statement is used to remove a property from an object.
Rationale: The spread operator is represented by three dots (...).
Rationale: Arrow functions retain the lexical scope of the context in which they were defined.
Rationale: The let and const keywords are block-scoped, not function-scoped.
Rationale: ECMAScript 6 (ES6) introduced block scope with the let and const keywords.
enclosing scope even after that scope has finished execution.
Rationale: Closures let a function access variables from an enclosing scope even after the enclosing function has returned.
var x = 10; (function() { console.log(x); var x = 20; console.log(x); })(); a. 10, 20 b. 10, undefined c. undefined, 20 d. ReferenceErrorRationale: Due to variable hoisting, var x inside the function is hoisted to the top and initialized to undefined.
Rationale: Redux implements a predictable state container based on unidirectional data flow.