commit
ef35cf4fff
2 changed files with 3 additions and 3 deletions
|
@ -314,7 +314,7 @@ And the last note. There are some lazy programmers who, instead of declaring a n
|
||||||
|
|
||||||
As the result, the variable is like a box where people throw different things without changing the sticker. What is inside it now? Who knows... We need to come closer and check.
|
As the result, the variable is like a box where people throw different things without changing the sticker. What is inside it now? Who knows... We need to come closer and check.
|
||||||
|
|
||||||
Such a programmer saves a little bit on variable declaration, but looses ten times more on debugging the code.
|
Such a programmer saves a little bit on variable declaration, but loses ten times more on debugging the code.
|
||||||
|
|
||||||
An extra variable is good, not evil.
|
An extra variable is good, not evil.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Data types
|
# Data types
|
||||||
|
|
||||||
A variable in JavaScript can contain any data. A variable can at one moment be a string and later recieve a numeric value:
|
A variable in JavaScript can contain any data. A variable can at one moment be a string and later receive a numeric value:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// no error
|
// no error
|
||||||
|
@ -8,7 +8,7 @@ let message = "hello";
|
||||||
message = 123456;
|
message = 123456;
|
||||||
```
|
```
|
||||||
|
|
||||||
Programming languages that allow such thing are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them.
|
Programming languages that allow such things are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them.
|
||||||
|
|
||||||
There are 7 basic data types in JavaScript. Here we'll study the basics, and in next chapters we'll talk about each of them in detail.
|
There are 7 basic data types in JavaScript. Here we'll study the basics, and in next chapters we'll talk about each of them in detail.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue