diff --git a/files/en-us/learn/javascript/objects/basics/index.md b/files/en-us/learn/javascript/objects/basics/index.md index e999ddd30f67fc3..bf0c336223ac88e 100644 --- a/files/en-us/learn/javascript/objects/basics/index.md +++ b/files/en-us/learn/javascript/objects/basics/index.md @@ -106,7 +106,7 @@ const person = { From now on, we'll use this shorter syntax. -An object like this is referred to as an **object literal** — we've literally written out the object contents as we've come to create it. This is in contrast to objects instantiated from classes, which we'll look at later on. +An object like this is referred to as an **object literal** — we've literally written out the object contents as we've come to create it. This is different compared to objects instantiated from classes, which we'll look at later on. It is very common to create an object using an object literal when you want to transfer a series of structured, related data items in some manner, for example sending a request to the server to be put into a database. Sending a single object is much more efficient than sending several items individually, and it is easier to work with than an array, when you want to identify individual items by name. @@ -157,7 +157,7 @@ name.first name.last ``` -Otherwise your methods will no longer work. +Otherwise, your methods will no longer work. ## Bracket notation @@ -296,8 +296,7 @@ This function creates and returns a new object each time we call it. The object - a property `name` - a method `introduceSelf()`. -Note that `createPerson()` takes a parameter `name` to set the value of the `name` property, but the value of the `introduceSelf()` method will be the same for all objects created using this function. This is a very common pattern for creating objects. - +Note that `createPerson()` takes a parameter `name` to set the value of the `name` property, but the value of the `introduceSelf()` method will be the same for all objects created using this function. This is a very common pattern for creating objects. Now we can create as many objects as we like, reusing the definition: diff --git a/files/en-us/web/api/idbrequest/readystate/index.md b/files/en-us/web/api/idbrequest/readystate/index.md index b35b01526824bb1..418af1f86409d67 100644 --- a/files/en-us/web/api/idbrequest/readystate/index.md +++ b/files/en-us/web/api/idbrequest/readystate/index.md @@ -26,6 +26,7 @@ occurs. ## Value One of the following strings: + - `pending` - : Returned if the request is still ongoing. - `done` diff --git a/files/en-us/web/api/webglrenderingcontext/teximage2d/index.md b/files/en-us/web/api/webglrenderingcontext/teximage2d/index.md index 749012741171869..7a42b0f9496ac01 100644 --- a/files/en-us/web/api/webglrenderingcontext/teximage2d/index.md +++ b/files/en-us/web/api/webglrenderingcontext/teximage2d/index.md @@ -720,38 +720,38 @@ texImage2D(target, level, internalformat, width, height, border, format, type, s When using the {{domxref("EXT_sRGB")}} extension: - - `ext.SRGB_EXT` - - `ext.SRGB_ALPHA_EXT` + - `ext.SRGB_EXT` + - `ext.SRGB_ALPHA_EXT` When using a {{domxref("WebGL2RenderingContext", "WebGL 2 context", "", 1)}}, the following values are available additionally: - - `gl.R8` - - `gl.R16F` - - `gl.R32F` - - `gl.R8UI` - - `gl.RG8` - - `gl.RG16F` - - `gl.RG32F` - - `gl.RG8UI` - - `gl.RG16UI` - - `gl.RG32UI` - - `gl.RGB8` - - `gl.SRGB8` - - `gl.RGB565` - - `gl.R11F_G11F_B10F` - - `gl.RGB9_E5` - - `gl.RGB16F` - - `gl.RGB32F` - - `gl.RGB8UI` - - `gl.RGBA8` - - `gl.SRGB8_ALPHA8` - - `gl.RGB5_A1` - - `gl.RGB10_A2` - - `gl.RGBA4` - - `gl.RGBA16F` - - `gl.RGBA32F` - - `gl.RGBA8UI` + - `gl.R8` + - `gl.R16F` + - `gl.R32F` + - `gl.R8UI` + - `gl.RG8` + - `gl.RG16F` + - `gl.RG32F` + - `gl.RG8UI` + - `gl.RG16UI` + - `gl.RG32UI` + - `gl.RGB8` + - `gl.SRGB8` + - `gl.RGB565` + - `gl.R11F_G11F_B10F` + - `gl.RGB9_E5` + - `gl.RGB16F` + - `gl.RGB32F` + - `gl.RGB8UI` + - `gl.RGBA8` + - `gl.SRGB8_ALPHA8` + - `gl.RGB5_A1` + - `gl.RGB10_A2` + - `gl.RGBA4` + - `gl.RGBA16F` + - `gl.RGBA32F` + - `gl.RGBA8UI` - `width` - : A {{domxref("WebGL_API/Types", "GLsizei")}} specifying the width of the texture. @@ -787,23 +787,23 @@ texImage2D(target, level, internalformat, width, height, border, format, type, s When using the {{domxref("OES_texture_half_float")}} extension: - - `ext.HALF_FLOAT_OES` (constant provided by the extension) + - `ext.HALF_FLOAT_OES` (constant provided by the extension) When using a {{domxref("WebGL2RenderingContext", "WebGL 2 context", "", 1)}}, the following values are available additionally: - - `gl.BYTE` - - `gl.UNSIGNED_SHORT` - - `gl.SHORT` - - `gl.UNSIGNED_INT` - - `gl.INT` - - `gl.HALF_FLOAT` - - `gl.FLOAT` - - `gl.UNSIGNED_INT_2_10_10_10_REV` - - `gl.UNSIGNED_INT_10F_11F_11F_REV` - - `gl.UNSIGNED_INT_5_9_9_9_REV` - - `gl.UNSIGNED_INT_24_8` - - `gl.FLOAT_32_UNSIGNED_INT_24_8_REV` (pixels must be + - `gl.BYTE` + - `gl.UNSIGNED_SHORT` + - `gl.SHORT` + - `gl.UNSIGNED_INT` + - `gl.INT` + - `gl.HALF_FLOAT` + - `gl.FLOAT` + - `gl.UNSIGNED_INT_2_10_10_10_REV` + - `gl.UNSIGNED_INT_10F_11F_11F_REV` + - `gl.UNSIGNED_INT_5_9_9_9_REV` + - `gl.UNSIGNED_INT_24_8` + - `gl.FLOAT_32_UNSIGNED_INT_24_8_REV` (pixels must be {{jsxref("null")}}) - `pixels` diff --git a/files/en-us/web/api/webglrenderingcontext/texsubimage2d/index.md b/files/en-us/web/api/webglrenderingcontext/texsubimage2d/index.md index 41da15cfbc00914..e94359e903ca885 100644 --- a/files/en-us/web/api/webglrenderingcontext/texsubimage2d/index.md +++ b/files/en-us/web/api/webglrenderingcontext/texsubimage2d/index.md @@ -84,12 +84,12 @@ texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixe When using a {{domxref("WebGL2RenderingContext", "WebGL 2 context", "", 1)}}, the following values are available additionally: - - `gl.RED` - - `gl.RG` - - `gl.RED_INTEGER` - - `gl.RG_INTEGER` - - `gl.RGB_INTEGER` - - `gl.RGBA_INTEGER` + - `gl.RED` + - `gl.RG` + - `gl.RED_INTEGER` + - `gl.RG_INTEGER` + - `gl.RGB_INTEGER` + - `gl.RGBA_INTEGER` - `type` @@ -107,23 +107,23 @@ texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixe When using the {{domxref("OES_texture_half_float")}} extension: - - `gl.HALF_FLOAT_OES` + - `gl.HALF_FLOAT_OES` When using a {{domxref("WebGL2RenderingContext", "WebGL 2 context", "", 1)}}, the following values are available additionally: - - `gl.BYTE` - - `gl.UNSIGNED_SHORT` - - `gl.SHORT` - - `gl.UNSIGNED_INT` - - `gl.INT` - - `gl.HALF_FLOAT` - - `gl.FLOAT` - - `gl.UNSIGNED_INT_2_10_10_10_REV` - - `gl.UNSIGNED_INT_10F_11F_11F_REV` - - `gl.UNSIGNED_INT_5_9_9_9_REV` - - `gl.UNSIGNED_INT_24_8` - - `gl.FLOAT_32_UNSIGNED_INT_24_8_REV` (pixels must be + - `gl.BYTE` + - `gl.UNSIGNED_SHORT` + - `gl.SHORT` + - `gl.UNSIGNED_INT` + - `gl.INT` + - `gl.HALF_FLOAT` + - `gl.FLOAT` + - `gl.UNSIGNED_INT_2_10_10_10_REV` + - `gl.UNSIGNED_INT_10F_11F_11F_REV` + - `gl.UNSIGNED_INT_5_9_9_9_REV` + - `gl.UNSIGNED_INT_24_8` + - `gl.FLOAT_32_UNSIGNED_INT_24_8_REV` (pixels must be {{jsxref("null")}}) - `pixels` diff --git a/files/en-us/web/javascript/reference/classes/extends/index.md b/files/en-us/web/javascript/reference/classes/extends/index.md index 3f0e557ece0acc8..ad4f80b55bab6c7 100644 --- a/files/en-us/web/javascript/reference/classes/extends/index.md +++ b/files/en-us/web/javascript/reference/classes/extends/index.md @@ -45,7 +45,7 @@ class ModernClass { class AnotherChildClass extends ModernClass {} ``` -The `.prototype` of the `ParentClass` must be an {{jsxref("Object")}} or {{jsxref("null")}}. +The `.prototype` of the `ParentClass` must be an {{jsxref("Object")}} or {{jsxref("null")}}. ```js function ParentClass() {} @@ -56,7 +56,7 @@ class ChildClass extends ParentClass {} ``` > **Note:** You would rarely worry about this in practice, because a non-object `prototype` doesn't behave as it should anyway. -> +> > ```js > function ParentClass() {} > ParentClass.prototype = 3;