Skip to content

Commit 029b716

Browse files
authored
Translated solution.md
1 parent 6d06975 commit 029b716

File tree

1 file changed

+3
-3
lines changed
  • 1-js/02-first-steps/04-variables/3-uppercast-constant

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
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.
1+
Mes dažniausiai naudojame didžiąsias raides konstantoms, kurios yra iš anksto užprogramuotos (angliškai vadinamos "hard-coded"). Arba kitaip sakant kai vertė yra žinoma prieš įvykdymą ir yra tiesiai įrašyta į kodą.
22

3-
In this code, `birthday` is exactly like that. So we could use the upper case for it.
3+
Šis kodas, `birthday` yra būtent toks. Tad mes galime jam naudoti didžiąsias raides.
44

5-
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.
5+
Tačiau priešingai yra su `age`, kuris yra įvertinamas vykdymo metu. Šiandien mes turime vienokį amžių, bet po metų jis jau bus kitoks. Jis yra konstanta tik dėl to, kad jis nesikeičia įvykdant kodą. Bet jis yra kiek "mažiau pastovus" negu `birthday`: jis yra suskaičiuojamas, dėl tos priežasties turėtume jam palikti mažąsias raides.

0 commit comments

Comments
 (0)