πŸ“Š JavaScript
Q. What is the value of x?
Code:
let x = '5';
x = +x;
  • (A) '5'
  • (B) 5
  • (C) NaN
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (B) 5

Explanation: Unary plus converts the string to a number.

Explanation by: Chandani
Unary plus converts the string to a number.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
68
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
80%
Success Rate