Which of the following javascript functions allows you to get user input data?(A) alert(B) prompt(C) confirm(D) None of the above
View Answer
Which logical operator only accepts a single operand?(A) &&(AND)(B) ||(OR)(C) !(NOT)(D) None of the above
View Answer
What will be the output of the following code?<script>let ans = 1;document.write( ans === '1');</script>(A) true(B) false(C) 0(D) None of the above
View Answer
What will be the output of the following code?<script>var x = [typeof x, typeof y][1];document.write(typeof typeof x);</script>(A) undefined(B) string(C) number(D) boolean
View Answer
What will be the output of the following code?<script>let age = 20;let result = age>18 ? 'Great' : 'Not so great';document.write(result);</script>(A) Great(B) Not so great(C) true(D) None of the above
View Answer
What will be the output of the following code?<script>let y = 1;y = typeof x;document.write(typeof y);</script>(A) string(B) null(C) number(D) boolean
View Answer
What will be the output of the following code?<script>let i = 30;if( i == 10 || i > 20){console.log('Hola');}else if( i == 5){console.log('Breaking up the code');}else{console.log('Adios');}</script>(A) Hola(B) Breaking up the code(C) Adios(D) None of the above
View Answer
What will be the output of the following code?<script>document.write((0 && 1) || (1 || 0));</script>(A) 0(B) false(C) true(D) 1
View Answer
What will be the output of the following code?<script>let ans = 0 / 0;document.write(ans);</script>(A) 0(B) infinity(C) NaN(D) None of the above
View Answer