In JavaScript, there is only one numeric type for ordinary numbers: number.
JavaScript number is a double-precision 64-bit binary format (IEEE 754).
There is no separate float, double, or decimal type in core JavaScript.
So:
typeof pi === ' number ' ;
Hence, the correct answer is:
A. Number
Options B, C, D are specific numeric types found in other languages (like C, Java, C#), not distinct types in JavaScript.
Study Guide Concepts:
JavaScript primitive types
typeof operator and number
Lack of separate float / double / decimal types in JS
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit