taskui
This commit is contained in:
parent
db4a880974
commit
06cdd5b84a
23 changed files with 110 additions and 775 deletions
|
@ -0,0 +1,21 @@
|
|||
## The variable for our planet
|
||||
|
||||
That's simple:
|
||||
|
||||
```js
|
||||
let ourPlanetName = "Earth";
|
||||
```
|
||||
|
||||
Note, we could use a shorter name `planet`, but it might be not obvious what planet it refers to. It's nice to be more verbose. At least until the variable isNotTooLong.
|
||||
|
||||
## The name of the current visitor
|
||||
|
||||
```js
|
||||
let currentUserName = "John";
|
||||
```
|
||||
|
||||
Again, we could shorten that to `userName` if we know for sure that the user is current.
|
||||
|
||||
Modern editors and autocomplete make long variable names easy to write. Don't save on them. A name with 3 words in it is fine.
|
||||
|
||||
And if your editor does not have proper autocompletion, get [a new one](/code-editors).
|
|
@ -0,0 +1,8 @@
|
|||
importance: 3
|
||||
|
||||
---
|
||||
|
||||
# Giving the right name
|
||||
|
||||
1. Create a variable with the name of our planet. How would you name such a variable?
|
||||
2. Create a variable to store the name of a current visitor to a website. How would you name that variable?
|
Loading…
Add table
Add a link
Reference in a new issue