Single Choice Easy

QWhat would the following JavaScript code produce?

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

ID: #5041 Scripted Media 282 views
Question Info
#5041Q ID
EasyDifficulty
Scripted MediaTopic

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

The toLocaleString() method formats a number into a string using language-specific formatting. In this example, we use the "fi-FI" value to specify the Finnish locale.
The ttoLocaleString() method converts a number into a string using language-specific formatting. In this case, we use the "fi-FI" value to indicate the Finnish locale.
This method converts a number into a string using language-specific formatting. In this example, we use the "fi-FI" value to specify the number format in FINLAND.
The toLocaleString() method formats a number into a string using language-specific formatting. In this example, we use the "fi-FI" value to specify the Finnish number format.

Share This Question

Challenge a friend or share with your study group.