-
Notifications
You must be signed in to change notification settings - Fork 12
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
Translate Variables page #7
base: master
Are you sure you want to change the base?
Conversation
GasimGasimzada
commented
Feb 15, 2020
•
edited
Loading
edited
- Overview
- A Variable
- Real-life Analogy
- Variable naming
- Constants
- Name things right
- Summary
- Tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at the corrections and make a change to it. Thanks!
@@ -1,12 +1,12 @@ | |||
In the code below, each line corresponds to the item in the task list. | |||
Aşağıdakı kodda olan hər sətir tapşıqıda olan hər maddəyə aiddir. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tapşıqda" olan hər (there is a typo)
``` | ||
|
||
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. | ||
Nəzərə alın ki, biz `planet` adından istifadə edə bilərdik. Lakin, bu ad ilə hansı planetdən danışdığımız bilinməyəcəkdi. Daha məlumatlı adlar yazmaq yaxşıdır. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
danışdığımız "bilinməyəcəkdir." (the word should end with r)
I think "aydın" better suits in the sentence than "məlumatlı"
|
||
And if your editor does not have proper autocompletion, get [a new one](/code-editors). | ||
Əgər redaktorununzda avtomatik tamamlayıcı qurğu yoxdursa, [yeni redaktor əldə edin](/code-editors). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct the typo
|
||
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? | ||
1. Bizim planetimizin adında dəyişən yaradın. Bu dəyişəni necə adlandırardınız? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Bizim planetimiz" is better
@@ -1,5 +1,5 @@ | |||
We generally use upper case for constants that are "hard-coded". Or, in other words, when the value is known prior to execution and directly written into the code. | |||
Normalda, biz əl ilə yazılan sabit dəyişənləri böyük hərf ilə yazırıq. Digər sözlə, dəyişənin dəyəri skriptin icrasından öncə bilindikdə və kodda birbaşa yazıldıqda biz bu dəyişəni böyük hərf ilə yazırıq. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Digər sözlə, dəyişənin (there is no comma)
|
||
In this code, `birthday` is exactly like that. So we could use the upper case for it. | ||
Bu kodda, `birthday` dəyişəninin bu formada olduğundan biz böyük hərfdən istifadə edə bilərik. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comma
|
||
In contrast, `age` is evaluated in run-time. Today we have one age, a year after we'll have another one. It is constant in a sense that it does not change through the code execution. But it is a bit "less of a constant" than `birthday`: it is calculated, so we should keep the lower case for it. | ||
Lakin, `age` dəyişəni icra zamanı hesablanır. Bugün bizdə bir yaş, bir il sonra isə fərqli yaş olacaq. Bu dəyişən kod icrası zamanı dəyişmir amma bu dəyişən hesablanır deyə `birthday`-dən daha "az sabitdir". Bu səbəbdən, bu dəyişənin adı böyük hərf ilə yazılmamalıdır. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lakin, age
dəyişəni (there is no comma)
Please make the requested changes. After it, add a comment "/done". |