Professional Documents
Culture Documents
Review Ws
Review Ws
2. JavaScript supports two types of scopes: Global scope and Local scope.
3. A function that is defined within another function and has access to its parent
function's variables is called a Closure.
5. The JavaScript method used to add new elements to the end of an array is push.
6. The concept in JavaScript where a function can have access to variables from its outer
scope even after the outer function has finished executing is known as closure .
9. The JavaScript method for removing the last element from an array is pop.
11. The keyword used to declare a variable in JavaScript that cannot be reassigned is
const.
13. The process of defining a new type of object in JavaScript is called creating a CONSTRUCTOR.
14. The JavaScript method for converting an object to a JSON string is JSON.stringfy.
15. The event in JavaScript that occurs when the user clicks on an HTML element is called
onclick.
16. The JavaScript operator used for strict equality comparison is ===.
18. The method in JavaScript used to execute a function after a specified time interval is
setTimeout.
20. The process of bringing a variable or function declaration to the top of its scope is known as
hoisting.
23. The JavaScript concept that allows a function to accept an indefinite number of arguments
is called rest parameters.
24. The keyword used in JavaScript to refer to the current object is this.
25. The JavaScript method for removing the first element from an array is shift.
Column A Column B
1. var name = "num1"; B. String
2. 5 + "5"; B. String
3. typeof myVar === "undefined"; C. Boolean
4. function add(x, y) { return x + y; } F. Function
5. let numbers = [1, 2, 3]; D. Array
6. const person = { name: "Alice", age: 25 }; E. Object
7. null == undefined; C. Boolean
8. console.log(typeof NaN); I. NaN
9. var isTruthy = true; C. Boolean
10. function multiplyBy(factor) { return M. Close
function (num) { return num * factor; } }
11. document.getElementById("myElement"); K. DOM
12. function Person(name, age) { this.name = T. Constructor
name; this.age = age; }
13. console.log(a); var a = 5; Q. Hoisting
14. fetch("https://api.example.com/data"); W. AJAX
15. let promise = new Promise((resolve, reject) U. Promise
=> { /* ... */ });
16. let colors = { primary: "blue", secondary: E. Object
"green" };
17. var button = J. Event
document.getElementById("myButton");
button.addEventListener("click",
function() { /* ... */ });
18. const numbers = [1, 2, 3]; const doubled = S. Operator
numbers.map((num) => num * 2);
19. let timerId = setTimeout(function() X, setTimeout
{ console.log("Timeout!"); }, 2000);
20. function greet(name = "Guest") R.Scope
{ console.log("Hello, " + name
+ "!"); }
21. if (typeof x === "undefined") { /* ... */ } G.undefined
22. let result = 10 / "abc"; I. NaN
23. var car = { make: "Toyota", model: E. Object
"Camry" };
24. let promise = new Promise((resolve, reject) U. Promise
=> { /* ... */ });
25. let greet = () => console.log("Hello, V. E56 Arrow Function
World!");