Skip to content

Update 02_.md #22

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,3 +1,3 @@
The sample code above contains 6 variables. The first three should look familiar as they are just variables that are declared and assigned a value. The fourth and fifth variable, `a` and `b` are declared on the same line. Calling more than one variable in one line is common in JavaScript. This can be achieved using a comma to separate each variable.

The two variables `sum` and `div` are not assigned a specific integer, but an addition/division of two variables. This is also common as the expressions on the right are evaluated before assigning the variable an integer. Notice that `div` is actually equal to "Infinity". Dividing any number by 0 will give you this result. The only exception is "0 / 0", which will return NaN (abbreviation for Not a Number).
The two variables `sum` and `div` are not assigned a specific integer, but an addition/division of two variables. This is also common as the expressions on the right are evaluated before assigning the variable an integer. Notice that `div` is actually equal to "Infinity". Dividing any number by 0 will give you this result. The only exception is "0 / 0", which will return NaN (abbreviation for Not a Number).