Interesting Puzzles dated - 07/03/2023

Hello Everyone!
It’s time to solve interesting puzzles.

  1. What is the output of the following code snippet?
var x = 10;

console.log(x + 5 + "5");

a) 105

b) 155

c) 1555

d) NaN

2.Which of the following is used to exit a loop in JavaScript?

a) break

b) continue

c) exit

d) return

  1. What is the output of the following code snippet?
var x = 10;

var y = "5";

console.log(x + y);

a) 105

b) 15

c) 1055

d) NaN

4.Which of the following is NOT a comparison operator in JavaScript?

a) ==

b) ===

c) !=

d) <=>
5. What is the output of the following code snippet?

var x = 10;

if (x > 5 && x < 15) {

console.log("x is between 5 and 15");

} else {

console.log("x is not between 5 and 15");

}

a) x is between 5 and 15

b) x is not between 5 and 15

c) Syntax error

d) Runtime error

Have a Happy Learning
Thanks & Regards
Teaching Assistant,
Dharshini M.

1 Like

1 c 155
2 a break
3 a 105
4 d <=>
5 a x is between 5 and 15

  1. 155
  2. break
  3. 105
  4. <=>
  5. x is between 5 and 15
  1. 155
    2.break
    3.105
    4.option d
    5.x is between 5 and 15

1.Ans:-B
2.Ans:-A
3.Ans:-A
4.Ans:-D
5.Ans:-A

1… c 155
2. a break
3. a 105
4. d <=>
5. a x is between 5 and 15

@karansagare99 @naveenpillai015 @manohar.kota13 @taukirsheikh2000 @kumaramansagar01
Thank you for your Valuable Responses :grinning:

Please check the right answer:

  1. b) 155
  2. a) break
  3. c) 1055
  4. d) <=>
  5. a) x is between 5 and 15