Make all TypedArray constructor examples consistent, remove var#17830
Conversation
added 27 commits
June 29, 2022 16:09
Contributor
wbamberg
reviewed
Jul 1, 2022
files/en-us/web/javascript/reference/global_objects/float32array/index.md
Show resolved
Hide resolved
wbamberg
reviewed
Jul 1, 2022
files/en-us/web/javascript/reference/global_objects/bigint64array/index.md
Show resolved
Hide resolved
added 13 commits
June 30, 2022 18:02
3 tasks
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.
Summary
This makes the example snippet used between the constructor of every
TypedArraysubclass consistent (modulo the detail forUint8ClampedArray). This also ensures that every page is tagged with the class name.I added spacing where appropriate, removed any remaining use of
var, renamed variables to fit common naming conventions, removed a redundant line, added a note about thebyteOffset, and propagated this example through every subclass.Motivation
This makes it obvious as to what changes between each type, by eliminating smaller unnecessary differences. Regarding
var, this encourages better coding practise. Lastly, it makes some broken examples function now.Supporting details
N/A.
Related issues
None.
Metadata