You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JavaScript example could indicate the language #59
I recommend this, since most people who write code do have to learn this syntax. They are not officially called language identifiers in the spec though, since some interpreters use the label you give in codeblocks in different ways, so they are called info-strings. But since for 99.9% of use-cases, it is the name of the language, we could write a comment like this next to it when you are introduced to them (we could do so at the start of the section by putting some generic programming language name in the block like "Language") , like:
In most cases, it is gennerally good practise to include the name of the programming language after the backticks on the same line.
I dont know JS, but could someone who does please contribute to this? This was opened 3 years ago! Anyway, I hope I made this easier to contribute for that person by writting this comment.
I forgot to add that the example he is probably referring to is number 3. Also, I realised that I made a typo in my example instruction and that it didn't account for non-programming languages like JSON:
In most cases, it is generally good practise to include the name of the language (JSON, JavaScript, Python etc.) after the backticks on the same line.
Activity
Sampo-Kolu commentedon Feb 19, 2026
I recommend this, since most people who write code do have to learn this syntax. They are not officially called language identifiers in the spec though, since some interpreters use the label you give in codeblocks in different ways, so they are called info-strings. But since for 99.9% of use-cases, it is the name of the language, we could write a comment like this next to it when you are introduced to them (we could do so at the start of the section by putting some generic programming language name in the block like "Language") , like:
I dont know JS, but could someone who does please contribute to this? This was opened 3 years ago! Anyway, I hope I made this easier to contribute for that person by writting this comment.
Sampo-Kolu commentedon Feb 19, 2026
I forgot to add that the example he is probably referring to is number 3. Also, I realised that I made a typo in my example instruction and that it didn't account for non-programming languages like JSON: