MCQ Single Best Answer 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 120 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: Option A

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.

Share This Question

Challenge a friend or share with your study group.