Q
Which of the following is a valid JavaScript literal expression?

Answer & Solution

Answer: Option B
Solution:
'Hello' is a string literal expression as it directly represents a string value in the code.
Related Questions on Average

What is the result of the expression '5 + 3 * 2'?

A). 16

B). 11

C). 10

D). 13

Which of the following is a function expression in JavaScript?

A). let x = 5;

B). function add(a, b) { return a + b; }

C). let y = 'Hello';

D). const PI = 3.14;

What is the result of '5 >= 5' in JavaScript?

A). 1

B). 0

C). null

D). undefined

Which operator is used for incrementing a value in JavaScript?

A). ++

B). --

C). +=

D). -=

What will be the value of '10 % 3' in JavaScript?

A). 1

B). 2

C). 3

D). 0

What is the value of the expression '10 ** 2' in JavaScript?

A). 20

B). 100

C). 200

D). 50

Which of the following is an example of a conditional expression in JavaScript?

A). (5 + 3)

B). true && false

C). (age >= 18) ? 'Adult' : 'Minor'

D). 'Hello' + 'World'

What is the value of the expression 'true && false'?

A). 1

B). 0

C). null

D). undefined

What will be the value of 'true

A).

B). false' in JavaScript?

C). 1

D). 0

Which of the following is a string expression in JavaScript?

A). 5 + 3

B). true && false

C). 'Hello' + 'World'

D). (5 > 3)