Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the purpose of the dynamic scoping?(a) Variables can be declared outside the scope(b) Variables must be declared outside the scope(c) Variables cannot be declared outside the scope(d) Variable cannot be declared within the functionThis question was addressed to me during an online exam.Asked question is from Closures in section Lexical Structures of JavaScript

Answer»

Correct option is (a) Variables can be DECLARED outside the scope

The best EXPLANATION: Dynamic SCOPING creates variables that can be called from outside the block of code in which they are DEFINED. A VARIABLE declared in this fashion is sometimes called a public variable.

2.

What is the opposite approach to the lexical scoping?(a) Literal scoping(b) Static scoping(c) Dynamic scoping(d) Generic scopingThis question was posed to me in a job interview.Origin of the question is Closures topic in division Lexical Structures of JavaScript

Answer»

The correct OPTION is (c) Dynamic scoping

To explain: The opposite approach to the LEXICAL scoping is the dynamic scoping. Dynamic scoping does not care how the code is written, but instead how it executes. Each time a new function is executed, a new scope is PUSHED onto the stack. This scope is typically stored with the function’s call stack. When a variable is REFERENCED in the function, the scope in each call stack is checked to see if it provides the value.

3.

What is the fundamental rule of lexical scoping?(a) Functions are declared in the scope(b) Functions are executed using scope chain(c) Functions are declared outside the scope(d) Variables are declared within the functionI have been asked this question during a job interview.I'd like to ask this question from Closures in portion Lexical Structures of JavaScript

Answer» CORRECT ANSWER is (b) Functions are EXECUTED USING scope chain

The best I can explain: The FUNDAMENTAL rule of lexical scoping is that the JavaScript functions are executed using the scope chain that was in effect when they were defined.
4.

Which of the following uses a lot of CPU cycles?(a) GUI(b) Statically generated graphics(c) Dynamically generated graphics(d) Generic scopingThe question was posed to me in a job interview.I would like to ask this question from Closures in section Lexical Structures of JavaScript

Answer»

Correct choice is (c) Dynamically generated graphics

To ELABORATE: Dynamic graphics for data, means simulating motion or movement using the computer. It MAY ALSO be thought of as multiple plots linked by time. Hence dynamically generating graphics from real-time data uses a LOT of CPU cycles.

5.

Which of the following is not an example of closures?(a) Objects(b) Variables(c) Functions(d) GraphicsI got this question in homework.This interesting question is from Closures topic in portion Lexical Structures of JavaScript

Answer» RIGHT CHOICE is (d) Graphics

For EXPLANATION: In JavaScript, closures are created EVERY time a function is created, at function creation time. Technically, all JavaScript functions are closures: they are objects, and they have a scope CHAIN associated with them.
6.

What is closure?(a) Function objects(b) Scope where function’s variables are resolved(c) Both Function objects and Scope where function’s variables are resolved(d) Function return valueThe question was posed to me in an interview for internship.This intriguing question originated from Closures topic in portion Lexical Structures of JavaScript

Answer»

The correct choice is (c) Both Function objects and Scope where function’s VARIABLES are RESOLVED

The best explanation: A combination of a function OBJECT and a scope (a set of variable bindings) in which the function’s variables are resolved is called a CLOSURE.

7.

What must be done in order to implement Lexical Scoping?(a) Get the object(b) Dereference the current scope chain(c) Reference the current scope chain(d) Return the valueThe question was posed to me during an interview.Enquiry is from Closures topic in section Lexical Structures of JavaScript

Answer»

The correct choice is (C) REFERENCE the current scope chain

Best explanation: In order to IMPLEMENT LEXICAL scoping, the internal state of a JavaScript function object MUST include not only the code of the function but also a reference to the current scope chain.

8.

What kind of scoping does JavaScript use?(a) Literal(b) Lexical(c) Segmental(d) SequentialI had been asked this question in quiz.I'd like to ask this question from Closures in section Lexical Structures of JavaScript

Answer»

The correct CHOICE is (B) LEXICAL

For explanation I would say: Like most modern PROGRAMMING languages, JavaScript uses lexical scoping. This means that functions are executed using the variable scope that was in EFFECT when they were defined, not the variable scope that is in effect when they are invoked.

9.

A function with no return value is called ___________(a) Procedures(b) Method(c) Static function(d) Dynamic functionI have been asked this question in a job interview.Origin of the question is Defining and Invoking Functions in portion Lexical Structures of JavaScript

Answer»

Correct option is (a) Procedures

To EXPLAIN I would say: Void FUNCTIONS does not return a value. Functions with no return value are SOMETIMES CALLED procedures.

10.

Which keyword is used to define the function in javascript?(a) void(b) int(c) function(d) mainI got this question during an internship interview.This key question is from Defining and Invoking Functions topic in chapter Lexical Structures of JavaScript

Answer»

Right option is (c) function

To explain: A JAVASCRIPT function is defined with the function keyword, FOLLOWED by a name, followed by parentheses(). Function NAMES can CONTAIN letters, digits, UNDERSCORES, and dollar signs (same rules as variables).

11.

The function stops its execution when it encounters?(a) continue statement(b) break statement(c) goto statement(d) return statementI had been asked this question in a job interview.This is a very interesting question from Defining and Invoking Functions topic in chapter Lexical Structures of JavaScript

Answer»

The correct choice is (d) return statement

Easiest EXPLANATION: Continue statement and break statement are USED in the loops for skipping the iteration or going out of the loop. WHENEVER a return statement is ENCOUNTERED the function execution is stopped.

12.

What will happen if a return statement does not have an associated expression?(a) It returns the value 0(b) It will throw an exception(c) It returns the undefined value(d) It will throw an errorI got this question in examination.This intriguing question comes from Defining and Invoking Functions in chapter Lexical Structures of JavaScript

Answer»

Correct choice is (c) It returns the UNDEFINED VALUE

For explanation: A function without a return STATEMENT will return a default value. If the return statement does not have an ASSOCIATED expression then it returns an undefined value.

13.

What is the purpose of a return statement in a function?(a) Returns the value and continues executing rest of the statements, if any(b) Returns the value and stops the program(c) Returns the value and stops executing the function(d) Stops executing the function and returns the valueThis question was posed to me in exam.Question is taken from Defining and Invoking Functions in chapter Lexical Structures of JavaScript

Answer» RIGHT choice is (d) Stops executing the function and RETURNS the value

The best I can explain: The return stops the execution of the function when it is encountered within the function. It returns the value to the statement where the function is CALLED.
14.

When does the function name become optional in JavaScript?(a) When the function is defined as a looping statement(b) When the function is defined as expressions(c) When the function is predefined(d) when the function is calledI have been asked this question in quiz.I'm obligated to ask this question of Defining and Invoking Functions in section Lexical Structures of JavaScript

Answer»

Correct OPTION is (b) When the FUNCTION is defined as EXPRESSIONS

Easy EXPLANATION: The function name is optional for functions defined as expressions. A function declaration statement actually declares a variable and assigns a function object to it.

15.

The function definitions in JavaScript begins with _____________(a) Identifier and Parentheses(b) Return type and Identifier(c) Return type, Function keyword, Identifier and Parentheses(d) Identifier and Return typeThis question was addressed to me during an interview.The doubt is from Defining and Invoking Functions topic in section Lexical Structures of JavaScript

Answer»

Correct ANSWER is (c) RETURN type, Function keyword, Identifier and Parentheses

The explanation: The function definitions begin with the keyword function FOLLOWED by an identifier that names the function and a pair of parentheses around a comma-separated LIST of zero or more identifiers.

16.

The reduce and reduceRight methods follow a common operation called __________(a) filter and fold(b) inject and fold(c) finger and fold(d) foldThis question was addressed to me in an internship interview.The question is from Array and Related Methods topic in portion Lexical Structures of JavaScript

Answer»

Correct choice is (b) inject and fold

The EXPLANATION: The reduceRight() METHOD reduces the array to a single value. The reduceRight() method executes a provided function for each value of the array (from right-to-left). The return value of the function is stored in an ACCUMULATOR (result/total). HENCE it does the operation of INJECTING and folding.

17.

The primary purpose of the array map() function is that it __________(a) maps the elements of another array into itself(b) passes each element of the array and returns the necessary mapped elements(c) passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function(d) pass the elements of the array into another arrayThis question was addressed to me in exam.Origin of the question is Array and Related Methods topic in section Lexical Structures of JavaScript

Answer»

Correct option is (c) PASSES each ELEMENT of the array on which it is invoked to the function you specify, and RETURNS an array CONTAINING the values returned by that function

Best explanation: map() is a PREDEFINED function in javascript used for mapping the array elements to be used for some other purpose. The map() method passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function.

18.

What will happen if reverse() and join() methods are used simultaneously?(a) Reverses and stores in the same array(b) Reverses and concatenates the elements of the array(c) Reverses(d) Stores the elements of an array in normal orderThe question was asked in an online interview.My question is taken from Array and Related Methods topic in division Lexical Structures of JavaScript

Answer»

Correct OPTION is (a) Reverses and STORES in the same array

Easiest explanation: The array.join() METHOD is an inbuilt function in JavaScript which is USED to join the elements of an array into a string. The reverse() followed by a join() will reverse the respective array and will store the REVERSED array in the memory.

19.

The pop() method of the array does which of the following task?(a) decrements the total length by 1(b) increments the total length by 1(c) prints the first element but no effect on the length(d) updates the elementI had been asked this question by my college director while I was bunking the class.I'd like to ask this question from Array and Related Methods topic in division Lexical Structures of JavaScript

Answer»

The correct CHOICE is (a) decrements the TOTAL LENGTH by 1

Easy explanation: pop() function pops out that is DELETE the last element from the array. Hence pop() method (it works with push()) reduces the length of an array by 1.

20.

The purpose of extensible attribute is to __________(a) make all of the own properties of that object non configurable(b) to configure and bring a writable property(c) “lock down” objects into a known state and prevent outside tampering(d) to include new properties into the objectI got this question during an interview.Asked question is from Object Attributes and Serialization topic in section Lexical Structures of JavaScript

Answer» RIGHT choice is (c) “LOCK down” objects into a known state and prevent outside tampering

Easiest explanation: Extensible attributes DETERMINES whether the object can have new properties or not. THEREFORE extensible attribute will allow an object to include and write properties into them.
21.

To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________(a) isPrototypeOf() method(b) equals() method(c) === operator(d) ==opertorThis question was posed to me during an interview for a job.The question is from Object Attributes and Serialization in division Lexical Structures of JavaScript

Answer» RIGHT option is (a) isPrototypeOf() method

To EXPLAIN I would say: Prototype is a global property which is available with ALMOST all the objects. To determine whether one object is the prototype of (or is part of the prototype CHAIN of) another object, one should use the isPrototype() method. To find out if P is the prototype of o write p.isPrototypeOf(o).
22.

A linkage of series of prototype objects is called as ________(a) prototype stack(b) prototype chain(c) prototype class(d) prototypesI had been asked this question in a job interview.Origin of the question is Object Attributes and Serialization in chapter Lexical Structures of JavaScript

Answer»

Right option is (b) prototype chain

Easy EXPLANATION: Consider an example, Date.prototype inherits PROPERTIES from OBJECT.prototype, so a Date object created by new Date() inherits properties from both Date.prototype and Object.prototype. This linked SERIES of prototype objects is known as prototype chain.

23.

The unordered collection of properties, each of which has a name and a value is called _________(a) String(b) Object(c) Serialized Object(d) ArrayThe question was asked in an online quiz.Enquiry is from Object Attributes and Serialization topic in portion Lexical Structures of JavaScript

Answer»

The correct answer is (B) Object

For explanation I would say: OBJECTS in JavaScript may be defined as an unordered collection of RELATED data, of primitive or reference types, in the form of “KEY:value” pairs. Hence each of the PROPERTY has a name and value.

24.

The object has three object attributes namely ________(a) Class, parameters, object’s extensible flag(b) Prototype, class, objects’ parameters(c) Prototype, class, object’s extensible flag(d) Native object, Classes and Interfaces and Object’s extensible flagThis question was posed to me in an online interview.This intriguing question originated from Object Attributes and Serialization topic in division Lexical Structures of JavaScript

Answer»

Correct answer is (C) PROTOTYPE, CLASS, object’s extensible flag

Explanation: Every object has three associated object attributes:

An object’s prototype is a reference to another object from which properties are inherited.

An object’s class is a string that categorizes the TYPE of an object.

An object’s extensible flag specifies WHETHER new properties may be added to the object.

25.

What will be the step of the interpreter in a jump statement when an exception is thrown?(a) The interpreter stops its work(b) The interpreter throws another exception(c) The interpreter jumps to the nearest enclosing exception handler(d) The interpreter throws an errorI have been asked this question at a job interview.My question is taken from Loops in JavaScript in portion Lexical Structures of JavaScript

Answer»

Right OPTION is (c) The INTERPRETER jumps to the nearest ENCLOSING exception handler

Explanation: When an exception is thrown in a jump statement, the interpreter jumps to the nearest enclosing exception handler, which may be in the same function or up the call STACK in an INVOKING function.

26.

The “var” and “function” are __________(a) Keywords(b) Declaration statements(c) Data types(d) PrototypesI got this question by my college professor while I was bunking the class.This question is from Statements in portion Lexical Structures of JavaScript

Answer» CORRECT answer is (b) DECLARATION statements

The explanation is: The var and function are declaration statements—they declare or define variables and functions. These statements define identifiers (variable and function names) that can be USED elsewhere in your PROGRAM and ASSIGN values to those identifiers.
27.

When an empty statement is encountered, a JavaScript interpreter __________(a) Ignores the statement(b) Prompts to complete the statement(c) Throws an error(d) Shows a warningI got this question in class test.This intriguing question originated from Statements in division Lexical Structures of JavaScript

Answer»

The correct choice is (a) Ignores the statement

The best explanation: The JAVASCRIPT interpreter takes no action when it executes an empty statement. The empty statement is OCCASIONALLY useful when you want to CREATE a loop that has an empty body.

28.

What is a block statement in JavaScript?(a) conditional block(b) block that contains a single statement(c) both conditional block and a single statement(d) block that combines multiple statements into a single compound statementI got this question in quiz.I want to ask this question from Statements in section Lexical Structures of JavaScript

Answer»

Correct OPTION is (d) block that combines MULTIPLE statements into a single COMPOUND statement

For explanation I WOULD SAY: A block statement groups zero or more statements. In languages other than JavaScript, it is known as a compound statement. A statement block is a block that combines more than one statements into a single compound statement for ease.

29.

A function definition expression can be called as __________(a) Function prototype(b) Function literal(c) Function calling(d) Function declarationThe question was posed to me in an online interview.This interesting question is from Expressions and Operators topic in section Lexical Structures of JavaScript

Answer»

The correct choice is (B) Function literal

Explanation: A function definition expression is a “function literal” in the same way that an object initializer is an “object literal.” A Function definition expression typically consists of the keyword function FOLLOWED by a comma-separated LIST of ZERO or more IDENTIFIERS (the parameter names) in parentheses and a block of JavaScript code (the function body) in curly braces.

30.

The snippet that has to be used to check if “a” is not equal to “null” is _________(a) if(a!=null)(b) if (!a)(c) if(a!null)(d) if(a!==null)I got this question in semester exam.My enquiry is from Types, Values and Variables in section Lexical Structures of JavaScript

Answer»

Correct OPTION is (d) if(a!==null)

To EXPLAIN: A strict comparison (e.g., ===) is only true if the OPERANDS are of the same type and the contents match. The more commonly-used abstract comparison (e.g. ==) converts the operands to the same type before making the comparison. The not-equal operator !== compares 0 to null and evaluates to either true or false.

31.

JavaScript is a _______________ language.(a) Object-Oriented(b) High-level(c) Assembly-language(d) Object-BasedThis question was addressed to me in an internship interview.I want to ask this question from Statements topic in chapter Lexical Structures of JavaScript

Answer»

The correct CHOICE is (d) Object-Based

Easiest explanation: JavaScript is not a full-blown OOP (Object-Oriented PROGRAMMING) language, such as JAVA or PHP, but it is an object-based language. The criteria for object orientation are the classic threesome of polymorphism, encapsulation and INHERITANCE and JavaScript doesn’t PASS this.

32.

The statement a===b refers to _________(a) Both a and b are equal in value, type and reference address(b) Both a and b are equal in value(c) Both a and b are equal in value and type(d) There is no such statementI got this question in an international level competition.I would like to ask this question from Types, Values and Variables in chapter Lexical Structures of JavaScript

Answer»

The CORRECT answer is (c) Both a and b are equal in VALUE and type

The best I can EXPLAIN: ”===” OPERATOR is known as the strict comparison operator. A strict comparison (===) is only true if the operands are of the same type and the CONTENTS match.

33.

The escape sequence ‘\f’ stands for _________(a) Floating numbers(b) Representation of functions that returns a value(c) \f is not present in JavaScript(d) Form feedThe question was asked in my homework.My enquiry is from Types, Values and Variables topic in section Lexical Structures of JavaScript

Answer» CORRECT option is (d) FORM feed

To elaborate: \f is the JavaScript escape SEQUENCE that stands for Form feed (\u000C). It skips to the start of the NEXT page. (APPLIES mostly to terminals where the output device is a printer rather than a VDU).
34.

JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.(a) Prints an exception error(b) Prints an overflow error(c) Displays “Infinity”(d) Prints the value as suchThis question was posed to me in an interview for internship.I need to ask this question from Types, Values and Variables topic in portion Lexical Structures of JavaScript

Answer»

Right answer is (c) DISPLAYSINFINITY

To explain: When the result of a numeric operation is larger than the largest representable NUMBER (overflow), JavaScript PRINTS the value as Infinity. Similarly, when a negative value becomes larger than the largest representable negative number, the result is negative infinity. The infinite values behave as you would expect: adding, subtracting, MULTIPLYING, or dividing them by anything results in an infinite value (possibly with the sign reversed).

35.

Which of the following is not considered as an error in JavaScript?(a) Syntax error(b) Missing of semicolons(c) Division by zero(d) Missing of BracketThis question was posed to me during an online interview.The query is from Types, Values and Variables in portion Lexical Structures of JavaScript

Answer»

Right option is (C) Division by zero

Easiest explanation: Division by zero is not an error in JavaScript: it simply returns INFINITY or negative infinity. There is ONE EXCEPTION, however: zero divided by zero does not have a WELL defined value, and the result of this operation is the special not-a-number value, printed as NaN.

36.

A hexadecimal literal begins with __________(a) 00(b) 0x(c) 0X(d) Both 0x and 0XThe question was posed to me in quiz.My question comes from Types, Values and Variables in chapter Lexical Structures of JavaScript

Answer»

Correct choice is (d) Both 0X and 0X

To ELABORATE: GENERALLY, X or x DENOTES HEXADECIMAL values. So, any integer literal that begins with 0X or 0x denotes a hexadecimal number.

37.

The generalised syntax for a real number representation is __________(a) [digits][.digits][(E|e)[(+|-)]digits](b) [digits][+digits][(E|e)[(+|-)]digits](c) [digits][(E|e)[(+|-)]digits](d) [.digits][digits][(E|e)[(+|-)]digits]I had been asked this question in class test.Question is taken from Types, Values and Variables topic in chapter Lexical Structures of JavaScript

Answer»

Correct option is (a) [digits][.digits][(E|e)[(+|-)]digits]

The explanation is: Floating-point literals may ALSO be represented using EXPONENTIAL notation: a real NUMBER FOLLOWED by the letter e (or E), followed by an optional PLUS or minus sign, followed by an integer exponent. This notation represents the real number multiplied by 10 to the power of the exponent.

38.

JavaScript Code can be called by using ___________(a) RMI(b) Triggering Event(c) Preprocessor(d) Function/MethodI got this question during an online exam.The query is from Types, Values and Variables topic in division Lexical Structures of JavaScript

Answer»

The correct OPTION is (d) Function/Method

For explanation I would SAY: JavaScript CODE can be called by making a function call to the element on which JavaScript has to be run. There are many other methods like onclick, onload, and onsubmit ETC.

39.

The type of a variable that is volatile is _______________(a) Volatile variable(b) Mutable variable(c) Immutable variable(d) Dynamic variableI have been asked this question in a job interview.The doubt is from Types, Values and Variables in section Lexical Structures of JavaScript

Answer»

The correct option is (B) Mutable VARIABLE

To explain: The VARIABLES WHOSE values can be changed are called mutable variable types. In JavaScript, only objects and ARRAYS are mutable, not primitive values.

40.

JavaScript can be written __________(a) directly into JS file and included into HTML(b) directly on the server page(c) directly into HTML pages(d) directly into the css fileThe question was asked during an online exam.This question is from Lexical Structure in section Lexical Structures of JavaScript

Answer»

The CORRECT answer is (a) directly into JS file and included into HTML

The BEST I can explain: JavaScript files can be saved by .JS EXTENSION and can be included in the HTML files. SCRIPT tag along with src attribute is used to include the js files.

41.

Which of the following Attribute is used to include External JS code inside your HTML Document?(a) src(b) ext(c) script(d) linkThe question was asked during an interview.I'm obligated to ask this question of Lexical Structure topic in portion Lexical Structures of JavaScript

Answer»

The correct option is (a) src

For explanation I WOULD say: Script “tag” is USED to include the JavaScript CODE. To include external JavaScript files “src” ATTRIBUTE is used inside the script tag.

42.

JavaScript Code can be called by using ____________(a) RMI(b) Triggering Event(c) Preprocessor(d) Function/MethodThe question was posed to me in an international level competition.My question comes from Lexical Structure in portion Lexical Structures of JavaScript

Answer»

Correct ANSWER is (d) Function/Method

The best I can explain: JavaScript code can be called by making a function call to the ELEMENT on which JavaScript has to be RUN. There are many other methods LIKE onclick, onload, and onsubmit ETC.

43.

Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)(a) parse(b) a sync(c) defer(d) typeThe question was posed to me in class test.The question is from Lexical Structure topic in chapter Lexical Structures of JavaScript

Answer» RIGHT OPTION is (C) defer

The best explanation: The defer attribute is a BOOLEAN attribute. When present, it specifies that the script is executed when the PAGE has finished parsing.
44.

JavaScript is ideal to ________(a) make computations in HTML simpler(b) minimize storage requirements on the web server(c) increase the download time for the client(d) increase the loading time of the websiteThis question was posed to me in an online interview.My question comes from Lexical Structure topic in division Lexical Structures of JavaScript

Answer»

Correct choice is (b) minimize STORAGE requirements on the web server

Explanation: JavaScript HELPS in performing various TASKS with minimum storage requirements. THEREFORE to minimize storage requirements, JavaScript is always a BETTER say.

45.

A JavaScript program developed on a Unix Machine ________(a) will throw errors and exceptions(b) must be restricted to a Unix Machine only(c) will work perfectly well on a Windows Machine(d) will be displayed as a JavaScript text on the browserThe question was asked by my college director while I was bunking the class.This interesting question is from Lexical Structure in division Lexical Structures of JavaScript

Answer»

Right answer is (c) will work perfectly well on a Windows Machine

To elaborate: JavaScript can be EXECUTED on DIFFERENT operating systems THEREFORE the program developed on UNIX will work perfectly fine on windows ALSO.

46.

The script tag must be placed in __________(a) the head tag(b) the head or body(c) the title or head(d) after the body tagI had been asked this question in an internship interview.The above asked question is from Lexical Structure in portion Lexical Structures of JavaScript

Answer»

Correct ANSWER is (B) the head or body

To explain: If the script tag is placed after the body tag, then, it will not be evaluated at all. Also, it is ALWAYS recommended and EFFECTIVE to USE the script snippet in the

tag.
47.

The main purpose of a “Live Wire” in NetScape is to ________(a) Create linkage between client side and server side(b) Permit server side, JavaScript code, to connect to RDBMS(c) Support only non relational database(d) To interpret JavaScript codeI got this question in class test.Enquiry is from Lexical Structure topic in division Lexical Structures of JavaScript

Answer»

Right CHOICE is (b) PERMIT SERVER side, JavaScript code, to connect to RDBMS

Best explanation: A Live Wire database driver also supports a NUMBER of non-relational DATABASES.

48.

The web development environment (JavaScript) offers which standard construct for data validation of the input entered by the user.(a) Controlled loop constructs(b) Server page access(c) Client side Event(d) Permit server-sideI have been asked this question at a job interview.I'd like to ask this question from Lexical Structure in chapter Lexical Structures of JavaScript

Answer»

The correct answer is (a) Controlled loop constructs

Easiest explanation: JavaScript provides with for, while loops and if, else, SWITCH cases for checking the information entered by the USER. Additionally, all DEVELOPMENT environments provide syntax to CREATE and use memory VARIABLES, constants, and functions.