Single Choice Easy

QWhat will the following JavaScript code produce?

<script>
var num = new Number(1000000).toLocaleString("fi-FI");
document.write(num);
</script>

ID: #5251 Javascript Graphics and Rendering MCQ 189 views
Question Info
#5251Q ID
EasyDifficulty
Javascript Graphics and Rendering MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 1 000 000 ✔ ✖
  • B 1 0 00000 ✔ ✖
  • C 100 000 0 ✔ ✖
  • D Undefined ✔ ✖
Correct Answer

Explanation

This method uses language-specific formatting to convert a number to a string. In this example, we use the "fi-FI" value to specify the FINLAND locale number format.

Today: 0 answered · 0 correct
Save progress
Free account

Want to remember what you got wrong?

Create a free account in seconds to track your score, revisit mistakes and continue Computer Science and Engineering where you left off.

  • Save your progress & streak
  • Topic-wise quizzes & scores
  • Bookmark tricky questions
  • Printable MCQ sets
Practice smarterFree account · save progress
Sign up free

Share This Question

Challenge a friend or share with your study group.