Skip to content

Update 02_.md #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The sample code above shows four different examples of variables holding numbers. The first line shows an integer declaration as the integer 5 is being declared into the variable `value`. The second line assigns a rough estimate of PI into the variable `pi`. The third line creates a new object using `new Number()`, which essentially does the same thing as the two statements above. Creating Number objects slows down execution speed and complicates the code, so is not recommended. The last variable declaration assigns `biggestNum` to the maximum value of a number, which is approximately 1.8 x 10^308. The minimum value for JavaScript numbers is 5 x 10^-324. This gives you an opportunity to create a variety of programs that use big or small numbers.
The sample code above shows four different examples of variables holding numbers. The first line shows an integer declaration as the integer 5 is being declared into the variable `value`. The second line assigns a rough estimate of PI into the variable `pi`. The third line creates a new object using `new Number()`, which essentially does the same thing as the two statements above. Creating Number objects slows down execution speed and complicates the code, so is not recommended. The last variable declaration assigns `biggestNum` to the maximum value of a number, which is approximately 1.8 x 10^308. The minimum value for JavaScript numbers is 5 x 10^-324. This gives you an opportunity to create a variety of programs that use big or small numbers.