Skip to content

Commit

Permalink
style: metadata spacing for web/javascript (mdn#20464)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Sep 9, 2022
1 parent 073f70e commit 968e6f1
Show file tree
Hide file tree
Showing 877 changed files with 877 additions and 0 deletions.
1 change: 1 addition & 0 deletions files/en-us/web/javascript/about_javascript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- Introduction
- JavaScript
---

{{JsSidebar}}

## What is JavaScript?
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/closures/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- JavaScript
- Reference
---

{{jsSidebar("Intermediate")}}

A **closure** is the combination of a function bundled together (enclosed) with references to its surrounding state (the **lexical environment**). In other words, a closure gives you access to an outer function's scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/data_structures/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- Types
---

{{jsSidebar("More")}}

Programming languages all have built-in data structures, but these often differ from one language to another. This article attempts to list the built-in data structures available in JavaScript and what properties they have. These can be used to build other data structures. Wherever possible, comparisons with other languages are drawn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- Guide
- JavaScript
---

{{JsSidebar("More")}}

Every property in JavaScript objects can be classified by three factors:
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/eventloop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- JavaScript
- events
---

{{JsSidebar("Advanced")}}

JavaScript has a runtime model based on an **event loop**, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks. This model is quite different from models in other languages like C and Java.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tags:
- l10n:priority
- statements
---

{{jsSidebar("JavaScript Guide")}}
{{PreviousNext("Web/JavaScript/Guide/Grammar_and_types",
"Web/JavaScript/Guide/Loops_and_iteration")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Operators
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_dates")}}

This chapter describes JavaScript's expressions and operators, including assignment, comparison, arithmetic, bitwise, logical, string, ternary and more.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Loops_and_iteration", "Web/JavaScript/Guide/Expressions_and_Operators")}}

Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Introduction", "Web/JavaScript/Guide/Control_flow_and_error_handling")}}

This chapter discusses JavaScript's basic grammar, variable declarations, data types and literals.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}}

The JavaScript Guide shows you how to use [JavaScript](/en-US/docs/Web/JavaScript) and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Regular_Expressions", "Web/JavaScript/Guide/Keyed_Collections")}}

This chapter introduces collections of data which are ordered by an index value. This includes arrays and array-like constructs such as {{jsxref("Array")}} objects and {{jsxref("TypedArray")}} objects.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide", "Web/JavaScript/Guide/Grammar_and_types")}}

This chapter introduces JavaScript and discusses some of its fundamental concepts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Using_promises", "Web/JavaScript/Guide/Meta_programming")}}

Iterators and Generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of {{jsxref("Statements/for...of","for...of")}} loops.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- l10n:priority
- set
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Indexed_Collections", "Web/JavaScript/Guide/Working_with_Objects")}}

This chapter introduces collections of data which are indexed by a key; `Map` and `Set` objects contain elements which are iterable in the order of insertion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Syntax
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}}
{{PreviousNext("Web/JavaScript/Guide/Control_flow_and_error_handling",
"Web/JavaScript/Guide/Functions")}}
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/meta_programming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Reflect
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}}{{PreviousNext("Web/JavaScript/Guide/Iterators_and_Generators", "Web/JavaScript/Guide/Modules")}}

The {{jsxref("Proxy")}} and {{jsxref("Reflect")}} objects allow you to intercept and define custom behavior for fundamental language operations (e.g. property lookup, assignment, enumeration, function invocation, etc.). With the help of these two objects you are able to program at the meta level of JavaScript.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ browser-compat:
- javascript.statements.import
- javascript.statements.export
---

{{JSSidebar("JavaScript Guide")}}{{Previous("Web/JavaScript/Guide/Meta_programming")}}

This guide gives you all you need to get started with JavaScript module syntax.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tags:
- Numeric
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Expressions_and_Operators", "Web/JavaScript/Guide/Text_formatting")}}

This chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in JavaScript. This includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global {{jsxref("Math")}} object to perform a wide variety of mathematical operations on numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Regular Expressions
- regex
---

{{jsSidebar("JavaScript Guide")}}

Assertions include boundaries, which indicate the beginnings and endings of lines and words, and other patterns indicating in some way that a match is possible (including look-ahead, look-behind, and conditional expressions).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Regular Expressions
- character classes
---

{{JSSidebar("JavaScript Guide")}}

Character classes distinguish kinds of characters such as, for example, distinguishing between letters and digits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- RegExp
---

{{jsSidebar("JavaScript Guide")}}

This page provides an overall cheat sheet of all the capabilities of `RegExp` syntax by aggregating the content of the articles in the `RegExp` guide. If you need more information on a specific topic, please follow the link on the corresponding heading to access the full article or head to [the guide](/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- backreferences
- regex
---

{{jsSidebar("JavaScript Guide")}}

Groups group multiple patterns as a whole, and capturing groups provide extra submatch information when using a regular expression pattern to match against a string. Backreferences refer to a previously captured group in the same regular expression.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- Regular Expressions
- regex
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Text_formatting", "Web/JavaScript/Guide/Indexed_collections")}}

Regular expressions are patterns used to match character combinations in strings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- quantifiers
- regex
---

{{jsSidebar("JavaScript Guide")}}

Quantifiers indicate numbers of characters or expressions to match.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- regex
- unicode property escapes
---

{{jsSidebar("JavaScript Guide")}}

**Unicode property escapes** [Regular Expressions](/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) allows for matching characters based on their Unicode properties. A character is described by several properties which are either binary ("boolean-like") or non-binary. For instance, unicode property escapes can be used to match emojis, punctuations, letters (even letters from specific languages or scripts), etc.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/text_formatting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- JavaScript
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Numbers_and_dates", "Web/JavaScript/Guide/Regular_Expressions")}}

This chapter introduces how to work with strings and text in JavaScript.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/using_classes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- Object
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Working_with_Objects", "Web/JavaScript/Guide/Using_promises")}}

JavaScript is a prototype-based language — an object's behaviors are specified by its own properties and its prototype's properties. However, with the addition of [classes](/en-US/docs/Web/JavaScript/Reference/Classes), the creation of hierarchies of objects and the inheritance of properties and their values are much more in line with other object-oriented languages such as Java. In this section, we will demonstrate how objects can be created from classes.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/guide/using_promises/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- asynchronous
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}}{{PreviousNext("Web/JavaScript/Guide/Using_Classes", "Web/JavaScript/Guide/Iterators_and_Generators")}}

A {{jsxref("Promise")}} is an object representing the eventual completion or failure of an asynchronous operation. Since most people are consumers of already-created promises, this guide will explain consumption of returned promises before explaining how to create them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tags:
- Object
- l10n:priority
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Keyed_collections", "Web/JavaScript/Guide/Using_Classes")}}

JavaScript is designed on a simple object-based paradigm. An object is a collection of properties, and a property is an association between a name (or _key_) and a value. A property's value can be a function, in which case the property is known as a method. In addition to objects that are predefined in the browser, you can define your own objects. This chapter describes how to use objects, properties, functions, and methods, and how to create your own objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
browser-compat: javascript.classes
---

{{jsSidebar("JavaScript Guide")}}

It's common to want to make fields or methods private, but JavaScript has lacked such a feature since its inception. Conventions have arisen — such as prefixing fields and methods that should be treated as private with an underscore, like `_hidden` — but these are merely conventions. The underscored features are still fully public.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Learn
- l10n:priority
---

{{JsSidebar}}

**JavaScript** (**JS**) is a lightweight, interpreted, or [just-in-time](https://en.wikipedia.org/wiki/Just-in-time_compilation) compiled programming language with {{Glossary("First-class Function", "first-class functions")}}. While it is most well-known as the scripting language for Web pages, [many non-browser environments](https://en.wikipedia.org/wiki/JavaScript#Other_usage) also use it, such as {{Glossary("Node.js")}}, [Apache CouchDB](https://couchdb.apache.org/) and [Adobe Acrobat](https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/). JavaScript is a [prototype-based](/en-US/docs/Glossary/Prototype-based_programming), multi-paradigm, [single-threaded](/en-US/docs/Glossary/Thread), [dynamic](/en-US/docs/Glossary/Dynamic_typing) language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more [about JavaScript](/en-US/docs/Web/JavaScript/About_JavaScript).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- JavaScript
- OOP
---

{{jsSidebar("Advanced")}}

JavaScript is a bit confusing for developers experienced in class-based languages (like Java or C++), as it is dynamic and does not have static types.
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/reference/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags:
- Guide
- JavaScript
---

{{JsSidebar}}

The JavaScript reference serves as a repository of facts about the JavaScript language. The entire language is described here in detail. As you write JavaScript code, you'll refer to these pages often (thus the title "JavaScript reference"). If you're learning JavaScript, or need help understanding some of its capabilities or features, check out the [JavaScript guide](/en-US/docs/Web/JavaScript/Guide).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- Initialization
browser-compat: javascript.classes.static_initialization_blocks
---

{{jsSidebar("Classes")}}

**Class static initialization blocks** are a special feature of a {{jsxref("Statements/class", "class")}} that enable more flexible initialization of {{jsxref("Classes/static", "static")}} properties than can be achieved using per-field initialization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Language feature
browser-compat: javascript.classes.constructor
---

{{jsSidebar("Classes")}}

The `constructor` method is a special method of a {{jsxref("Statements/class", "class")}} for creating and initializing an object instance of that class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Language feature
browser-compat: javascript.classes.extends
---

{{jsSidebar("Classes")}}

The **`extends`** keyword is used in [class declarations](/en-US/docs/Web/JavaScript/Reference/Statements/class) or
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/javascript/reference/classes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
- JavaScript
browser-compat: javascript.classes
---

{{JsSidebar("Classes")}}

Classes are a template for creating objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Language feature
browser-compat: javascript.classes.private_class_fields
---

{{JsSidebar("Classes")}}

Class fields are {{ jsxref('Classes/Public_class_fields','public') }} by default, but private class members can be created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- Language feature
browser-compat: javascript.classes.public_class_fields
---

{{JsSidebar("Classes")}}

Both static and instance public fields are writable, enumerable, and configurable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Static
browser-compat: javascript.classes.static
---

{{jsSidebar("Classes")}}

The **`static`** keyword defines a [static method or property](/en-US/docs/Web/JavaScript/Reference/Classes#static_methods_and_properties) for a class, or a [class static initialization block](/en-US/docs/Web/JavaScript/Reference/Classes/Class_static_initialization_blocks) (see the link for more information about this usage).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- Deprecated
---

{{JsSidebar("More")}}

This page lists features of JavaScript that are deprecated (that is, still available but planned for removal) and obsolete (that is, no longer usable).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- JavaScript
- Legacy Iterator
---

{{jsSidebar("More")}}

> **Warning:** The legacy iterator protocol was a SpiderMonkey-specific feature, which is removed in Firefox 58+. For future-facing usages, consider using [for...of](/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loops and the [iterator protocol](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- Source maps
- Warning
---

{{jsSidebar("Errors")}}

The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- TypeError
---

{{jsSidebar("Errors")}}

The JavaScript exception "invalid Array.prototype.sort argument" occurs when the argument of {{jsxref("Array.prototype.sort()")}} isn't either {{jsxref("undefined")}} or a function which compares its operands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tags:
- SyntaxError
- Warning
---

{{jsSidebar("Errors")}}

The JavaScript warning "08 (or 09) is not a legal ECMA-262 octal constant" occurs when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- RangeError
---

{{jsSidebar("Errors")}}

The JavaScript exception "radix must be an integer at least 2 and no greater than 36"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tags:
- JavaScript
- SyntaxError
---

{{jsSidebar("Errors")}}

The JavaScript exception "invalid regular expression flag" occurs when the flags in a regular expression contain any flag that is not one of: `g`, `i`, `m`, `s`, `u`, `y` or `d`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- SyntaxError
---

{{jsSidebar("Errors")}}

The JavaScript exception "return (or yield) not in function" occurs when a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- RangeError
---

{{jsSidebar("Errors")}}

The JavaScript exception "BigInt division by zero" occurs when a {{jsxref("BigInt")}} is divided by `0n`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- JavaScript
- RangeError
---

{{jsSidebar("Errors")}}

The JavaScript exception "BigInt negative exponent" occurs when a {{jsxref("BigInt")}} is raised to the power of a negative BigInt value.
Expand Down
Loading

0 comments on commit 968e6f1

Please sign in to comment.