-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
0 commit comments