javascript-tutorial / javascript-tutorial/en.javascript.info
Italicizing non-literal syntax?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
How about, when showing syntax like:
node.append(...nodes or strings) – append nodes or strings at the end of node,
node.prepend(...nodes or strings) – insert nodes or strings into the beginning of node,
that "node" (in this case), or whatever syntax is not literal, that is, that stands for some general type of thing, be put in italics, i.e., in this case, to have instead:
_node_.append(...nodes or strings) – append nodes or strings at the end of node,
_node_.prepend(...nodes or strings) – insert nodes or strings into the beginning of node,
(From: [https://javascript.info/modifying-document](url))
I think that would make the meaning of the syntax clearer. Also, this is what MDN does in their Syntax descriptions, e.g.:
_element_.appendChild(aChild);
[https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild](url)
This would also address some of my earlier concerns with the use of "str", "array", "obj", etc. from a couple months ago.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the syntax examples in the linked modifying-document article and compare them with the MDN appendChild example. Determine the scope of applying italics to non-literal syntax across the tutorial, then document the convention and update the relevant examples consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100