Q. How do you convert a number to a string in JavaScript?

  • (A) num.toString()
  • (B) String(num)
  • (C) num + ''
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above
Explanation: All listed methods are valid ways to convert a number to a string.
Explanation by: Chandani
All listed methods are valid ways to convert a number to a string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
66
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
96%
Success Rate