From 956d90963eab17859fd22b3e9dd7b967f99d871d Mon Sep 17 00:00:00 2001 From: OnkarRuikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Fri, 1 Jul 2022 07:42:37 +0530 Subject: [PATCH] -- to m-dash --- README.md | 10 +++++----- .../web_speech_api/using_the_web_speech_api/index.md | 2 +- files/en-us/web/api/window/speechsynthesis/index.md | 2 +- .../synchronous_and_asynchronous_requests/index.md | 2 +- .../consistent_list_indentation/index.md | 2 +- files/en-us/web/css/css_values_and_units/index.md | 4 ++-- files/en-us/web/css/gradient/conic-gradient/index.md | 2 +- .../web/css/gradient/repeating-conic-gradient/index.md | 2 +- files/en-us/web/css/offset-path/index.md | 2 +- files/en-us/web/css/right/index.md | 2 +- .../en-us/web/css/scaling_of_svg_backgrounds/index.md | 2 +- files/en-us/web/css/url/index.md | 2 +- .../orientation_and_motion_data_explained/index.md | 6 +++--- .../ajax/wai_aria_live_regions_api_support/index.md | 2 +- files/en-us/web/html/attributes/required/index.md | 2 +- files/en-us/web/html/attributes/step/index.md | 2 +- files/en-us/web/html/element/object/index.md | 4 ++-- .../equality_comparisons_and_sameness/index.md | 2 +- .../web/javascript/guide/regular_expressions/index.md | 2 +- .../reference/errors/is_not_iterable/index.md | 2 +- .../reference/functions/arrow_functions/index.md | 2 +- .../reference/functions/rest_parameters/index.md | 4 ++-- .../javascript/reference/global_objects/nan/index.md | 2 +- .../reference/global_objects/promise/index.md | 6 +++--- .../global_objects/symbol/toprimitive/index.md | 6 +++--- .../reference/statements/function_star_/index.md | 8 ++++---- files/en-us/web/javascript/shells/index.md | 2 +- .../web/performance/critical_rendering_path/index.md | 2 +- files/en-us/web/performance/how_browsers_work/index.md | 6 +++--- .../web/svg/namespaces_crash_course/example/index.md | 10 +++++----- 30 files changed, 52 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index db0121d98172148..d16c70c66eb34eb 100644 --- a/README.md +++ b/README.md @@ -79,20 +79,20 @@ If you choose an option other than the GitHub UI, you want to install These are some important things to keep in mind about the MDN content. - **A document's main content is written in an `index.html` or an `index.md` -file** -- We're currently in the process of converting our content from HTML +file** — We're currently in the process of converting our content from HTML into Markdown. Pages that are in HTML have their content in a file called "index.html". Pages that are in Markdown have their content in a file called "index.md". -- **Documents are folders** -- Documents are always +- **Documents are folders** — Documents are always represented by a folder (e.g., [`files/en-us/web/javascript`](files/en-us/web/javascript)), and that folder will contain the content of that specific document as an `index.html` or `index.md` file (e.g., [`files/en-us/web/javascript/index.md`](files/en-us/web/javascript/index.md)). - **Documents are hierarchical** - A document folder may contain other folders, where those folders would represent child documents (e.g., [`files/en-us/web/javascript/closures/index.md`](files/en-us/web/javascript/closures/index.md)). -- **Document folders may contain image files** -- A document folder may also +- **Document folders may contain image files** — A document folder may also contain image files, which are referenced within that document's `index.html` or `index.md` file. -- **All redirects are specified in a single file** -- All of the redirects +- **All redirects are specified in a single file** — All of the redirects are specified within [`files/en-us/_redirects.txt`](files/en-us/_redirects.txt), one redirect per line. Each line specifies a `from` and `to` URI separated by whitespace. When you move a document, you'll need to add a @@ -102,7 +102,7 @@ Both of these tasks are done using the `yarn content move` tool — see - **Don't edit the `_redirects.txt` file manually!** If both an `index.html` or `index.md` file and a redirect exist for a document, the document takes precedence and the redirect is ignored. -- **A document's `index.html` or `index.md` starts with "front-matter"** -- Each +- **A document's `index.html` or `index.md` starts with "front-matter"** — Each document's `index.html` or `index.md` file must begin with some [YAML](https://en.wikipedia.org/wiki/YAML) called front-matter that defines some important information about the document: `title`, `slug`, and [`tags`](https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Tag) diff --git a/files/en-us/web/api/web_speech_api/using_the_web_speech_api/index.md b/files/en-us/web/api/web_speech_api/using_the_web_speech_api/index.md index f0f36a6b12e379b..1c23a944c2d4b80 100644 --- a/files/en-us/web/api/web_speech_api/using_the_web_speech_api/index.md +++ b/files/en-us/web/api/web_speech_api/using_the_web_speech_api/index.md @@ -259,7 +259,7 @@ function populateVoiceList() { option.textContent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { - option.textContent += ' -- DEFAULT'; + option.textContent += ' — DEFAULT'; } option.setAttribute('data-lang', voices[i].lang); diff --git a/files/en-us/web/api/window/speechsynthesis/index.md b/files/en-us/web/api/window/speechsynthesis/index.md index 26366311b45cd24..b0a8fc3537c04e1 100644 --- a/files/en-us/web/api/window/speechsynthesis/index.md +++ b/files/en-us/web/api/window/speechsynthesis/index.md @@ -40,7 +40,7 @@ function populateVoiceList() { option.textContent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { - option.textContent += ' -- DEFAULT'; + option.textContent += ' — DEFAULT'; } option.setAttribute('data-lang', voices[i].lang); diff --git a/files/en-us/web/api/xmlhttprequest/synchronous_and_asynchronous_requests/index.md b/files/en-us/web/api/xmlhttprequest/synchronous_and_asynchronous_requests/index.md index 0228b0fd1bda642..162a970f6c226a4 100644 --- a/files/en-us/web/api/xmlhttprequest/synchronous_and_asynchronous_requests/index.md +++ b/files/en-us/web/api/xmlhttprequest/synchronous_and_asynchronous_requests/index.md @@ -162,7 +162,7 @@ if (request.status === 200) { Line 3 sends the request. The `null` parameter indicates that no body content is needed for the `GET` request. -Line 5 checks the status code after the transaction is completed. If the result is 200 -- HTTP's "OK" result -- the document's text content is output to the console. +Line 5 checks the status code after the transaction is completed. If the result is 200 — HTTP's "OK" result — the document's text content is output to the console. ### Example: Synchronous HTTP request from a Worker diff --git a/files/en-us/web/css/css_lists_and_counters/consistent_list_indentation/index.md b/files/en-us/web/css/css_lists_and_counters/consistent_list_indentation/index.md index f91d6e5632ac5de..53ffc3da3a4b599 100644 --- a/files/en-us/web/css/css_lists_and_counters/consistent_list_indentation/index.md +++ b/files/en-us/web/css/css_lists_and_counters/consistent_list_indentation/index.md @@ -78,7 +78,7 @@ If you're more interested in following the Internet Explorer/Opera model, then: ul {margin-left: 40px; padding-left: 0;} ``` -Of course, you can fill in your preferred values. Set both to `1.25em`, if you like -- there's no reason why you have to stick with pixel-based indentation. If you want to reset lists to have no indentation, then you still have to zero out both padding and margin: +Of course, you can fill in your preferred values. Set both to `1.25em`, if you like — there's no reason why you have to stick with pixel-based indentation. If you want to reset lists to have no indentation, then you still have to zero out both padding and margin: ```css ul {margin-left: 0; padding-left: 0;} diff --git a/files/en-us/web/css/css_values_and_units/index.md b/files/en-us/web/css/css_values_and_units/index.md index 4832a3b48e22454..6d3646a601b908e 100644 --- a/files/en-us/web/css/css_values_and_units/index.md +++ b/files/en-us/web/css/css_values_and_units/index.md @@ -13,7 +13,7 @@ spec-urls: --- {{CSSRef}} -Every CSS declaration includes a property / value pair. Depending on the property, the value can include a single integer or keyword, to a series of keywords and values with or without units. There are a common set of data types -- values and units -- that CSS properties accept. Below is an overview of most of these data types. Refer to the page for each value type for more detailed information. +Every CSS declaration includes a property / value pair. Depending on the property, the value can include a single integer or keyword, to a series of keywords and values with or without units. There are a common set of data types — values and units — that CSS properties accept. Below is an overview of most of these data types. Refer to the page for each value type for more detailed information. ## Textual data types @@ -178,7 +178,7 @@ Angle values are represented by the type {{cssxref("<angle>")}} and accept #### Time units -Time values are represented by the type {{cssxref("<time>")}}. When including a time value, the unit identifier -- the `s` or `ms` -- is required. It accepts the following values. +Time values are represented by the type {{cssxref("<time>")}}. When including a time value, the unit identifier — the `s` or `ms` — is required. It accepts the following values. | Unit | Name | Description | | ---- | ------------ | ----------------------------------------- | diff --git a/files/en-us/web/css/gradient/conic-gradient/index.md b/files/en-us/web/css/gradient/conic-gradient/index.md index 42d91c50d70d3ef..c1a18f024db42ae 100644 --- a/files/en-us/web/css/gradient/conic-gradient/index.md +++ b/files/en-us/web/css/gradient/conic-gradient/index.md @@ -95,7 +95,7 @@ By default, colors transition smoothly from the color at one color stop to the c conic-gradient(red 40grad, 80grad, blue 360grad); ``` -If two or more color stops are at the same location, the transition will be a hard line between the first and last colors declared at that location. To use conic gradients to create pie charts --- which is NOT the correct way to create pie charts as background images are not accessible -- use hard color stops, where the color stop angles for two adjacent color stops are the same. The easiest way to do this is to use multiple position colors stops. The following two declarations are equivalent: +If two or more color stops are at the same location, the transition will be a hard line between the first and last colors declared at that location. To use conic gradients to create pie charts — which is NOT the correct way to create pie charts as background images are not accessible — use hard color stops, where the color stop angles for two adjacent color stops are the same. The easiest way to do this is to use multiple position colors stops. The following two declarations are equivalent: ```css conic-gradient(#fff 0.09turn, #bbb 0.09turn, #bbb 0.27turn, #666 0.27turn, #666 0.54turn, #000 0.54turn); diff --git a/files/en-us/web/css/gradient/repeating-conic-gradient/index.md b/files/en-us/web/css/gradient/repeating-conic-gradient/index.md index ca17cda000550e8..9a7d5c09b76bab5 100644 --- a/files/en-us/web/css/gradient/repeating-conic-gradient/index.md +++ b/files/en-us/web/css/gradient/repeating-conic-gradient/index.md @@ -78,7 +78,7 @@ radial-gradient(red 33%, yellow 33% 66%, blue 66%); For a repeating gradient to repeat we define the first and last color stops. Like in non-repeating gradients, the first and last color stops are assumed to be 0 and either 100% or 360deg if not explicitly declared. When defaulting to these values, the repeating arc is 360 degrees, and therefore doesn't repeat. -Like the non-repeating conic gradient, the color-stops are placed around a gradient arc -- the circumference of a circle, rather than on the gradient line emerging from the center of the gradient. The colors transition as if spun around the center of a circle, starting at the top if no `from ` is declared, and going clockwise for the size of the angle that is the different between the largest and smallest color angle, then repeating. +Like the non-repeating conic gradient, the color-stops are placed around a gradient arc — the circumference of a circle, rather than on the gradient line emerging from the center of the gradient. The colors transition as if spun around the center of a circle, starting at the top if no `from ` is declared, and going clockwise for the size of the angle that is the different between the largest and smallest color angle, then repeating. A repeating conic gradient is specified by indicating a rotation angle, the center of the gradient, and then specifying a list of color-stops. Like non-repeating conic gradients, the color-stops of a repeating conic gradient are specified with an {{cssxref('angle')}}. Units include `deg` for degrees, `grad` for gradients, `rad` for radians, and `turn` for turns. There are 360 degrees, 400 gradians, 2π radians, and 1 turn in a circle. Browsers supporting repeating conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification. diff --git a/files/en-us/web/css/offset-path/index.md b/files/en-us/web/css/offset-path/index.md index a83ffb8da5d5de2..ee077942c335fe5 100644 --- a/files/en-us/web/css/offset-path/index.md +++ b/files/en-us/web/css/offset-path/index.md @@ -52,7 +52,7 @@ offset-path: unset; - `ray()` - : Taking up to three values, defines a path that is a line segment starting from the position of the box and proceeds in the direction defined by the specified angle similar to the CSS gradient angle where `0deg` is up, with positive angles increasing in the clockwise direction, with the size value being similar to the CSS radial gradient size values from `closest-side` to `farthest-corner`, and the keyterm `contain`. - `url()` - - : References the ID of an SVG shape -- `circle`, `ellipse`, `line`, `path`, `polygon`, `polyline`, or `rect` -- using the shape's geometry as the path. + - : References the ID of an SVG shape — `circle`, `ellipse`, `line`, `path`, `polygon`, `polyline`, or `rect` — using the shape's geometry as the path. - `` - : Specifies a [CSS shape](/en-US/docs/Web/CSS/CSS_Shapes/Basic_Shapes) including `circle()`, `ellipse()`, `inset()`, `polygon()`, or `path()`. diff --git a/files/en-us/web/css/right/index.md b/files/en-us/web/css/right/index.md index 45b37a2412ae167..c0eccc767e245ff 100644 --- a/files/en-us/web/css/right/index.md +++ b/files/en-us/web/css/right/index.md @@ -68,7 +68,7 @@ The effect of `right` depends on how the element is positioned (i.e., the value - When `position` is set to `sticky`, the `right` property is used to compute the sticky-constraint rectangle. - When `position` is set to `static`, the `right` property has _no effect_. -When both {{cssxref("left")}} and `right` are defined, if not prevented from doing so by other properties, the element will stretch to satisfy both. If the element cannot stretch to satisfy both -- for example, if a `width` is declared -- the position of the element is _over-constrained_. When this is the case, the `left` value has precedence when the container is left-to-right; the `right` value has precedence when the container is right-to-left. +When both {{cssxref("left")}} and `right` are defined, if not prevented from doing so by other properties, the element will stretch to satisfy both. If the element cannot stretch to satisfy both — for example, if a `width` is declared — the position of the element is _over-constrained_. When this is the case, the `left` value has precedence when the container is left-to-right; the `right` value has precedence when the container is right-to-left. ## Formal definition diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/index.md b/files/en-us/web/css/scaling_of_svg_backgrounds/index.md index ddf10d3946c16a1..50bf6333a240a70 100644 --- a/files/en-us/web/css/scaling_of_svg_backgrounds/index.md +++ b/files/en-us/web/css/scaling_of_svg_backgrounds/index.md @@ -269,7 +269,7 @@ Since this image has an explicit 100 pixel height, the 3:4 ratio explicitly sets #### Source: No fixed dimensions with intrinsic ratio -When an intrinsic ratio is specified, but no dimensions, rule 4 is applied -- except that rule 2 also applies. The image is therefore rendered just like for the `contain` case. +When an intrinsic ratio is specified, but no dimensions, rule 4 is applied — except that rule 2 also applies. The image is therefore rendered just like for the `contain` case. ```css background: url(no-dimensions-1x1-ratio.svg); diff --git a/files/en-us/web/css/url/index.md b/files/en-us/web/css/url/index.md index c8b83b78f4d5551..f1bc064484f1eda 100644 --- a/files/en-us/web/css/url/index.md +++ b/files/en-us/web/css/url/index.md @@ -83,7 +83,7 @@ The **`url()`** function can be included as a value for If you choose to write the URL without quotes, use a backslash (`\`) before any parentheses, whitespace characters, single quotes (`'`) and double quotes (`"`) that are part of the URL. - path - - : References the ID of an [SVG shape](/en-US/docs/Web/SVG/Tutorial/Basic_Shapes) -- `circle`, `ellipse`, `line`, `path`, `polygon`, `polyline`, or `rect` -- using the shape's geometry as the path. + - : References the ID of an [SVG shape](/en-US/docs/Web/SVG/Tutorial/Basic_Shapes) — `circle`, `ellipse`, `line`, `path`, `polygon`, `polyline`, or `rect` — using the shape's geometry as the path. - `` {{Experimental_Inline}} - : In the future, the `url()` function may support specifying a modifier, an identifier or a functional notation, which alters the meaning of the URL string. This is not supported and not fully defined in the specification. diff --git a/files/en-us/web/events/orientation_and_motion_data_explained/index.md b/files/en-us/web/events/orientation_and_motion_data_explained/index.md index f4eb9bd52576309..d8c35a8f820692a 100644 --- a/files/en-us/web/events/orientation_and_motion_data_explained/index.md +++ b/files/en-us/web/events/orientation_and_motion_data_explained/index.md @@ -43,7 +43,7 @@ Rotation is described about any given axis in terms of the number of degrees of ### Alpha -Rotation around the z axis -- that is, twisting the device -- causes the **alpha** rotation angle to change: +Rotation around the z axis — that is, twisting the device — causes the **alpha** rotation angle to change: ![](alpha.png) @@ -51,7 +51,7 @@ The alpha angle is 0° when top of the device is pointed directly toward the Ear ### Beta -Rotation around the x axis -- that is, tipping the device away from or toward the user -- causes the **beta** rotation angle to change: +Rotation around the x axis — that is, tipping the device away from or toward the user — causes the **beta** rotation angle to change: ![Positive beta pitches the device forward toward the user.](beta2.png) @@ -59,7 +59,7 @@ The beta angle is 0° when the device's top and bottom are the same distance fro ### Gamma -Rotation around the y axis -- that is, tilting the device toward the left or right -- causes the **gamma** rotation angle to change: +Rotation around the y axis — that is, tilting the device toward the left or right — causes the **gamma** rotation angle to change: ![](gamma.png) diff --git a/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md b/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md index 3da8b2f96e22f09..34bade0e1946988 100644 --- a/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md +++ b/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md @@ -26,7 +26,7 @@ As always, we're open to questions and suggestions for changes in [community for | Text inserted | text_changed::insert | IA2_EVENT_TEXT_INSERTED (use IAccessibleText::get_newText to retrieve the offsets and inserted text) | | Text replaced | text_changed::delete followed immediately by text_changed::insert | IA2_EVENT_TEXT_REMOVED followed immediately by IA2_EVENT_TEXT_INSERTED | -\* We do not use MSAA's CREATE/DESTROY at the request of screen reader vendors, who avoid those events because they cause crashes on some important system -- SHOW/HIDE are the equivalent of those events. +\* We do not use MSAA's CREATE/DESTROY at the request of screen reader vendors, who avoid those events because they cause crashes on some important system — SHOW/HIDE are the equivalent of those events. ## Retrieving author-supplied ARIA live region semantics from an event diff --git a/files/en-us/web/html/attributes/required/index.md b/files/en-us/web/html/attributes/required/index.md index 02371d53aa5c9c8..6962d6036123655 100644 --- a/files/en-us/web/html/attributes/required/index.md +++ b/files/en-us/web/html/attributes/required/index.md @@ -18,7 +18,7 @@ The `required` attribute is supported by `{{HTMLElement("input/text","text")}}`, The attribute is not supported or relevant to {{HTMLElement("input/range","range")}} and {{HTMLElement("input/color","color")}}, as both have default values. It is also not supported on {{HTMLElement("input/hidden","hidden")}} as it can not be expected that a user to fill out a form that is hidden. Nor is it supported on any of the button types, including `image`. -Note `color` and `range` don't support `required`, but type `color` defaults to `#000000`, and `range` defaults to the midpoint between `min` and `max` -- with `min` and `max` defaulting to 0 and 100 respectively in most browsers if not declared -- so always has a value. +Note `color` and `range` don't support `required`, but type `color` defaults to `#000000`, and `range` defaults to the midpoint between `min` and `max` — with `min` and `max` defaulting to 0 and 100 respectively in most browsers if not declared — so always has a value. In the case of a same named group of {{HTMLElement("input/radio","radio")}} buttons, if a single radio button in the group has the `required` attribute, a radio button in that group must be checked, although it doesn't have to be the one with the attribute is applied. So to improve code maintenance, it is recommended to either include the `required` attribute in every same-named radio button in the group, or else in none. diff --git a/files/en-us/web/html/attributes/step/index.md b/files/en-us/web/html/attributes/step/index.md index 09390e398f812b7..75327e55acb9a15 100644 --- a/files/en-us/web/html/attributes/step/index.md +++ b/files/en-us/web/html/attributes/step/index.md @@ -15,7 +15,7 @@ browser-compat: html.elements.input.attributes.step The **`step`** attribute is a number that specifies the granularity that the value must adhere to or the keyword `any`. It is valid for the numeric input types, including the {{HTMLElement("input/date", "date")}}, {{HTMLElement("input/month", "month")}}, {{HTMLElement("input/week", "week")}}, {{HTMLElement("input/time", "time")}}, {{HTMLElement("input/datetime-local", "datetime-local")}}, {{HTMLElement("input/number", "number")}} and {{HTMLElement("input/range", "range")}} types. -The `step` sets the _stepping interval_ when clicking up and down spinner buttons, moving a slider left and right on a range, and validating the different date types. If not explicitly included, `step` defaults to 1 for `number` and `range`, and 1 unit type (minute, week, month, day) for the date/time input types. The value can must be a positive number - integer or float -- or the special value `any`, which means no stepping is implied, and any value is allowed (barring other constraints, such as [`min`](/en-US/docs/Web/HTML/Attributes/min) and [`max`](/en-US/docs/Web/HTML/Attributes/max)). +The `step` sets the _stepping interval_ when clicking up and down spinner buttons, moving a slider left and right on a range, and validating the different date types. If not explicitly included, `step` defaults to 1 for `number` and `range`, and 1 unit type (minute, week, month, day) for the date/time input types. The value can must be a positive number - integer or float — or the special value `any`, which means no stepping is implied, and any value is allowed (barring other constraints, such as [`min`](/en-US/docs/Web/HTML/Attributes/min) and [`max`](/en-US/docs/Web/HTML/Attributes/max)). The default stepping value for `number` inputs is 1, allowing only integers to be entered, _unless_ the stepping base is not an integer. The default stepping value for `time` is 1 second, with 900 being equal to 15 minutes. diff --git a/files/en-us/web/html/element/object/index.md b/files/en-us/web/html/element/object/index.md index 113c23b6704f23a..c8af558fecd1550 100644 --- a/files/en-us/web/html/element/object/index.md +++ b/files/en-us/web/html/element/object/index.md @@ -89,7 +89,7 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Global_attrib - {{HTMLAttrDef("form")}} - : The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a {{HTMLElement("form")}} element in the same document. - {{HTMLAttrDef("height")}} - - : The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes)) + - : The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). — (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes)) - {{HTMLAttrDef("name")}} - : The name of valid browsing context (HTML5), or the name of the control (HTML 4). - {{HTMLAttrDef("standby")}} {{deprecated_inline}} @@ -99,7 +99,7 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Global_attrib - {{HTMLAttrDef("usemap")}} - : A hash-name reference to a {{HTMLElement("map")}} element; that is a '#' followed by the value of a {{htmlattrxref("name", "map")}} of a map element. - {{HTMLAttrDef("width")}} - - : The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes)) + - : The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). — (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes)) ## Examples diff --git a/files/en-us/web/javascript/equality_comparisons_and_sameness/index.md b/files/en-us/web/javascript/equality_comparisons_and_sameness/index.md index 08095eb7391e277..03cb1fd3c47ccf5 100644 --- a/files/en-us/web/javascript/equality_comparisons_and_sameness/index.md +++ b/files/en-us/web/javascript/equality_comparisons_and_sameness/index.md @@ -57,7 +57,7 @@ console.log(obj === null); // false console.log(obj === undefined); // false ``` -Strict equality is almost always the correct comparison operation to use. For all values except numbers, it uses the obvious semantics: a value is only equal to itself. For numbers it uses slightly different semantics to gloss over two different edge cases. The first is that floating point zero is either positively or negatively signed. This is useful in representing certain mathematical solutions, but as most situations don't care about the difference between `+0` and `-0`, strict equality treats them as the same value. The second is that floating point includes the concept of a not-a-number value, `NaN`, to represent the solution to certain ill-defined mathematical problems: negative infinity added to positive infinity, for example. Strict equality treats `NaN` as unequal to every other value -- including itself. (The only case in which `(x !== x)` is `true` is when `x` is `NaN`.) +Strict equality is almost always the correct comparison operation to use. For all values except numbers, it uses the obvious semantics: a value is only equal to itself. For numbers it uses slightly different semantics to gloss over two different edge cases. The first is that floating point zero is either positively or negatively signed. This is useful in representing certain mathematical solutions, but as most situations don't care about the difference between `+0` and `-0`, strict equality treats them as the same value. The second is that floating point includes the concept of a not-a-number value, `NaN`, to represent the solution to certain ill-defined mathematical problems: negative infinity added to positive infinity, for example. Strict equality treats `NaN` as unequal to every other value — including itself. (The only case in which `(x !== x)` is `true` is when `x` is `NaN`.) ## Loose equality using == diff --git a/files/en-us/web/javascript/guide/regular_expressions/index.md b/files/en-us/web/javascript/guide/regular_expressions/index.md index d8f8b7cedafc85b..99d14d063fd1fd2 100644 --- a/files/en-us/web/javascript/guide/regular_expressions/index.md +++ b/files/en-us/web/javascript/guide/regular_expressions/index.md @@ -411,7 +411,7 @@ There are a number of other differences between unicode and non-unicode regular - Unicode regular expressions do not support so-called "identity escapes"; that is, patterns where an escaping backslash is not needed and effectively ignored. For example, `/\a/` is a valid regular expression matching the letter 'a', but `/\a/u` is not. -- Curly brackets need to be escaped when not used as [quantifiers](/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Quantifiers). For example, `/{/` is a valid regular expression matching the curly bracket '{', but `/{/u` is not -- instead, the bracket should be escaped and `/\\{/u` should be used instead. +- Curly brackets need to be escaped when not used as [quantifiers](/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Quantifiers). For example, `/{/` is a valid regular expression matching the curly bracket '{', but `/{/u` is not — instead, the bracket should be escaped and `/\\{/u` should be used instead. - The `-` character is interpreted differently within character classes. In particular, for unicode regular expressions, `-` is interpreted as a literal `-` (and not as part of a range) only if it appears at the start or end of a pattern. For example, `/[\w-:]/` is a valid regular expression matching a word character, a `-`, or `:`, but `/\w-:/u` is an invalid regular expression, as `\w` to `:` is not a well-defined range of characters. diff --git a/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md b/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md index 77adb0a6195e824..e8bf03b83a58074 100644 --- a/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md +++ b/files/en-us/web/javascript/reference/errors/is_not_iterable/index.md @@ -137,7 +137,7 @@ returns an object which is an iterator, which is to say it must have a next meth ```js example-bad const myEmptyIterable = { [Symbol.iterator]() { - return [] // [] is iterable, but it is not an iterator -- it has no next method. + return [] // [] is iterable, but it is not an iterator — it has no next method. } } diff --git a/files/en-us/web/javascript/reference/functions/arrow_functions/index.md b/files/en-us/web/javascript/reference/functions/arrow_functions/index.md index 0b19613dbabcf9a..39ef0948e2fc86d 100644 --- a/files/en-us/web/javascript/reference/functions/arrow_functions/index.md +++ b/files/en-us/web/javascript/reference/functions/arrow_functions/index.md @@ -51,7 +51,7 @@ function (a){ return a + 100; } -// 2. Remove the body braces and word "return" -- the return is implied. +// 2. Remove the body braces and word "return" — the return is implied. (a) => a + 100; // 3. Remove the argument parentheses diff --git a/files/en-us/web/javascript/reference/functions/rest_parameters/index.md b/files/en-us/web/javascript/reference/functions/rest_parameters/index.md index 70ec775f37767ba..736807732f19b0a 100644 --- a/files/en-us/web/javascript/reference/functions/rest_parameters/index.md +++ b/files/en-us/web/javascript/reference/functions/rest_parameters/index.md @@ -89,9 +89,9 @@ for converting a set of arguments to an array. function f(a, b) { let normalArray = Array.prototype.slice.call(arguments) - // -- or -- + // — or — let normalArray = [].slice.call(arguments) - // -- or -- + // — or — let normalArray = Array.from(arguments) let first = normalArray.shift() // OK, gives the first argument diff --git a/files/en-us/web/javascript/reference/global_objects/nan/index.md b/files/en-us/web/javascript/reference/global_objects/nan/index.md index 8d40d751c0787d1..f0801e6a4949bcd 100644 --- a/files/en-us/web/javascript/reference/global_objects/nan/index.md +++ b/files/en-us/web/javascript/reference/global_objects/nan/index.md @@ -33,7 +33,7 @@ There are five different types of operations that return `NaN`: ### Testing against NaN -`NaN` compares unequal (via `==`, `!=`, `===`, and `!==`) to any other value -- including to another `NaN` value. Use {{jsxref("Number.isNaN()")}} or {{jsxref("Global_Objects/isNaN", "isNaN()")}} to most clearly determine whether a value is `NaN`. Or perform a self-comparison: `NaN`, and only `NaN`, will compare unequal to itself. +`NaN` compares unequal (via `==`, `!=`, `===`, and `!==`) to any other value — including to another `NaN` value. Use {{jsxref("Number.isNaN()")}} or {{jsxref("Global_Objects/isNaN", "isNaN()")}} to most clearly determine whether a value is `NaN`. Or perform a self-comparison: `NaN`, and only `NaN`, will compare unequal to itself. ```js NaN === NaN; // false diff --git a/files/en-us/web/javascript/reference/global_objects/promise/index.md b/files/en-us/web/javascript/reference/global_objects/promise/index.md index a20c0acac561aec..ba8cb21896687f7 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/index.md @@ -133,7 +133,7 @@ To illustrate this a bit further we can take a look at how an [`