translated code structure#49
Merged
bogdanbacosca merged 2 commits intojavascript-tutorial:masterfrom Nov 27, 2022
Merged
Conversation
lighthousand
requested changes
Feb 10, 2020
| ``` | ||
|
|
||
| Here, JavaScript interprets the line break as an "implicit" semicolon. This is called an [automatic semicolon insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion). | ||
| Aici, JavaScript interpretează întreruperea liniei ca punct și virgulă „implicit”. Aceasta se numește [introducerea automata a punctului și virgulei](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion). |
Member
There was a problem hiding this comment.
Missing diacritics : "automata" --> "automată"
| **În cele mai multe cazuri, o linie nouă implică punct și virgulă. Dar „în majoritatea cazurilor” nu înseamnă „întotdeauna!** | ||
|
|
||
| There are cases when a newline does not mean a semicolon. For example: | ||
| Sunt cazuri când o linie nouă nu înseamna un punct și virgulă. De exemplu: |
Member
There was a problem hiding this comment.
Missing diacritics : "înseamna" --> "înseamnă"
| ``` | ||
|
|
||
| The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so the semicolon is not required. And in this case that works as intended. | ||
| Codul va afișa `6` deoarece JavaScript nu inserează punct și virgulă aici. Este intuitiv evident că, dacă linia se termină cu un plus `"+"`, atunci este o "expresie incompletă", deci punctul si virgula nu este necesar. Și în acest caz, funcționează așa cum este intenționat |
Member
There was a problem hiding this comment.
Missing diacritics : "punctul si virgula" --> "punctul și virgula"
Please add period at the end (.)
| ````smart header="An example of an error" | ||
| If you're curious to see a concrete example of such an error, check this code out: | ||
| ````smart header="Exemplu de eroare" | ||
| Dacă sunteți curios să vedeți un exemplu concret de astfel de eroare, verificați acest cod: |
Member
There was a problem hiding this comment.
Proposal :
I think we shouldn't be too formal in our articulation. Maybe we could go for something like "Dacă ești curios să vezi...".
| ```smart header="Use hotkeys!" | ||
| In most editors, a line of code can be commented out by pressing the `key:Ctrl+/` hotkey for a single-line comment and something like `key:Ctrl+Shift+/` -- for multiline comments (select a piece of code and press the hotkey). For Mac, try `key:Cmd` instead of `key:Ctrl`. | ||
| ```smart header="Folosiți tastele rapide!" | ||
| În majoritatea editorilor, o linie de cod poate fi comentată apăsând tasta `key:Ctrl+/` pentru un comentariu pe o singură linie și `key:Ctrl+Shift+/` -- pentru comentarii pe mai multe linii (selectați o bucată de cod și apăsați tasta rapidă). Pentru Mac, încercați `key:Cmd` în loc de `key:Ctrl`. |
Member
There was a problem hiding this comment.
Grammar suggestion : "editorilor" --> "editoarelor"
|
Please make the requested changes. After it, add a comment "/done". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.