Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0b1484d

Browse files
Merge pull request #17 from borsec-suveran/patch-14
Update 02_.md
2 parents 4482a73 + ce52b20 commit 0b1484d

File tree

1 file changed

+1
-1
lines changed
  • 02_Data Types and Variables/00_Data Types/02_JavaScript Data Types

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
As shown in the sample code above, there are many data types and ways to declare a variable. The variable `count` holds an integer data type in the first line, but is assigned to a string data type in the second line. This is allowed in JavaScript as all variables can hold any data type. Other data types including float (basically int but with decimals), as well as boolean (either true of false). The `const` keyword is only used when we want to create a constant that will not change in the program. This is the reason why `MAX_COUNT = 0;` is commented in the program. Removing the comments will cause an error as the value of the constant `MAX_COUNT` cannot be changed after it is declared
1+
As shown in the sample code above, there are many data types and ways to declare a variable. The variable `count` holds an integer data type in the first line, but is assigned to a string data type in the second line. This is allowed in JavaScript as all variables can hold any data type. Other data types including float (basically int but with decimals), as well as boolean (either true of false) hold only specific data types. The `const` keyword is only used when we want to create a constant that will not change in the program. This is the reason why `MAX_COUNT = 0;` is commented in the program. Removing the comments will cause an error as the value of the constant `MAX_COUNT` cannot be changed after it is declared.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /