Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | JavaScript Course Quiz 1 | Question 16

  • Last Updated : 26 Aug, 2021

What will be the output of the following code snippet
let data=’false’;
data?console.log(‘first statement’):console.log(‘second statement’);

(A) first statement
(B) Second statement
(C) Can’t say

(D) None of the above

Answer: (A)

Explanation: The data variable is set to a non empty string and thus is considered to be true

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!