Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | JavaScript Course Quiz 1 | Question 34

  • Last Updated : 26 Aug, 2021

What will be the output of the following code
const firstName=’Rishi’ lastName=’Raj’
console.log(`hello ${firstName}, nice to meet you`)

(A) hello ${firstName}, nice to meet you
(B) hello Rishi, nice to meet you
(C) hello Raj, nice to meet you
(D) None of the above


Answer: (B)

Explanation: Back ticks (“) are used to dynamically enter the values of variables in a string

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!