diff options
author | Ryan Johnson <rjohnson@mozilla.com> | 2021-04-29 16:16:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 16:16:42 -0700 |
commit | 95aca4b4d8fa62815d4bd412fff1a364f842814a (patch) | |
tree | 5e57661720fe9058d5c7db637e764800b50f9060 /files/my/web | |
parent | ee3b1c87e3c8e72ca130943eed260ad642246581 (diff) | |
download | translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.gz translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.bz2 translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.zip |
remove retired locales (#699)
Diffstat (limited to 'files/my/web')
-rw-r--r-- | files/my/web/css/@font-face/index.html | 196 | ||||
-rw-r--r-- | files/my/web/css/css_transitions/index.html | 59 | ||||
-rw-r--r-- | files/my/web/css/index.html | 110 | ||||
-rw-r--r-- | files/my/web/guide/index.html | 67 | ||||
-rw-r--r-- | files/my/web/http/connection_management_in_http_1.x/index.html | 86 | ||||
-rw-r--r-- | files/my/web/http/index.html | 90 | ||||
-rw-r--r-- | files/my/web/index.html | 90 | ||||
-rw-r--r-- | files/my/web/javascript/index.html | 104 | ||||
-rw-r--r-- | files/my/web/javascript/reference/index.html | 312 | ||||
-rw-r--r-- | files/my/web/javascript/reference/statements/function_star_/index.html | 252 | ||||
-rw-r--r-- | files/my/web/javascript/reference/statements/index.html | 130 |
11 files changed, 0 insertions, 1496 deletions
diff --git a/files/my/web/css/@font-face/index.html b/files/my/web/css/@font-face/index.html deleted file mode 100644 index d834a0a44c..0000000000 --- a/files/my/web/css/@font-face/index.html +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: '@font-face' -slug: Web/CSS/@font-face -translation_of: Web/CSS/@font-face ---- -<div>{{CSSRef}}</div> - -<p><span class="seoSummary">The <strong><code>@font-face</code></strong> <a href="/en-US/docs/CSS">CSS</a> <a href="/en-US/docs/CSS/At-rule">at-rule</a> specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.</span></p> - -<h2 id="Syntax">Syntax</h2> - -<pre class="brush: css no-line-numbers notranslate">@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -}</pre> - -<h3 id="Descriptors">Descriptors</h3> - -<dl> - <dt>{{cssxref("@font-face/font-display", "font-display")}}</dt> - <dd>Determines how a font face is displayed based on whether and when it is downloaded and ready to use.</dd> - <dt>{{cssxref("@font-face/font-family", "font-family")}}</dt> - <dd>Specifies a name that will be used as the font face value for font properties.</dd> - <dt>{{cssxref("@font-face/font-stretch", "font-stretch")}}</dt> - <dd>A {{cssxref("font-stretch")}} value. Since Firefox 61 (and in other modern browsers) this also accepts two values to specify a range that is supported by a font-face, for example <code>font-stretch: 50% 200%;</code></dd> - <dt>{{cssxref("@font-face/font-style", "font-style")}}</dt> - <dd>A {{cssxref("font-style")}} value. Since Firefox 61 (and in other modern browsers) this also accepts two values to specify a range that is supported by a font-face, for example <code>font-style: oblique 20deg 50deg;</code></dd> - <dt>{{cssxref("@font-face/font-weight", "font-weight")}}</dt> - <dd>A {{cssxref("font-weight")}} value. Since Firefox 61 (and in other modern browsers) this also accepts two values to specify a range that is supported by a font-face, for example <code>font-weight: 100 400;</code></dd> - <dt>{{cssxref("@font-face/font-variant", "font-variant")}}</dt> - <dd>A {{cssxref("font-variant")}} value.</dd> - <dt>{{cssxref("font-feature-settings", "font-feature-settings")}}</dt> - <dd>Allows control over advanced typographic features in OpenType fonts.</dd> - <dt>{{cssxref("@font-face/font-variation-settings", "font-variation-settings")}}</dt> - <dd>Allows low-level control over OpenType or TrueType font variations, by specifying the four letter axis names of the features to vary, along with their variation values.</dd> - <dt>{{cssxref("@font-face/src", "src")}}</dt> - <dd> - <p>Specifies the resource containing the font data. This can be a URL to a remote font file location or the name of a font on the user's computer.</p> - - <p>To provide the browser with a hint as to what format a font resource is — so it can select a suitable one — it is possible to include a format type inside a <code>format()</code> function:</p> - - <pre class="brush: css notranslate">src: url(ideal-sans-serif.woff) <strong>format("woff")</strong>, - url(basic-sans-serif.ttf) <strong>format("truetype")</strong>;</pre> - - <p>The available types are: <code>"woff"</code>, <code>"woff2"</code>, <code>"truetype"</code>, <code>"opentype"</code>, <code>"embedded-opentype"</code>, and <code>"svg"</code>.</p> - </dd> - <dt>{{cssxref("@font-face/unicode-range", "unicode-range")}}</dt> - <dd>The range of Unicode code points to be used from the font.</dd> -</dl> - -<h2 id="Description">Description</h2> - -<p>If the <code>local()</code> function is provided, specifying a font name to look for on the user's computer, and the {{Glossary("user agent")}} finds a match, that local font is used. Otherwise, the font resource specified using the <code>url()</code> function is downloaded and used.</p> - -<p>By allowing authors to provide their own fonts, <code>@font-face</code> makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts which are so common that they're considered to be universally available). The ability to specify the name of a locally-installed font to look for and use makes it possible to customize the font beyond the basics while making it possible to do so without relying on an Internet connection.</p> - -<p>It's common to use both <code>url()</code> and <code>local()</code> together, so that the user's installed copy of the font is used if available, falling back to downloading a copy of the font if it's not found on the user's device.</p> - -<p>The <code>@font-face</code> at-rule may be used not only at the top level of a CSS, but also inside any <a href="/en-US/docs/Web/CSS/At-rule#Conditional_group_rules">CSS conditional-group at-rule</a>.</p> - -<h3 id="Font_MIME_Types">Font MIME Types</h3> - -<table> - <thead> - <tr> - <th>Format</th> - <th>MIME type</th> - </tr> - </thead> - <tbody> - <tr> - <td>TrueType</td> - <td><code>font/ttf</code></td> - </tr> - <tr> - <td>OpenType</td> - <td><code>font/otf</code></td> - </tr> - <tr> - <td>Web Open Font Format</td> - <td><code>font/woff</code></td> - </tr> - <tr> - <td>Web Open Font Format 2</td> - <td><code>font/woff2</code></td> - </tr> - </tbody> -</table> - -<h3 id="Notes">Notes</h3> - -<ul> - <li>Web fonts are subject to the same domain restriction (font files must be on the same domain as the page using them), unless <a href="/en-US/docs/HTTP_access_control">HTTP access controls</a> are used to relax this restriction.</li> - <li><code>@font-face</code> cannot be declared within a CSS selector. For example, the following will not work: - <pre class="brush: css; example-bad notranslate">.className { - @font-face { - font-family: MyHelvetica; - src: local("Helvetica Neue Bold"), - local("HelveticaNeue-Bold"), - url(MgOpenModernaBold.ttf); - font-weight: bold; - } -}</pre> - </li> -</ul> - -<h2 id="Formal_syntax">Formal syntax</h2> - -{{csssyntax}} - -<h2 id="Examples">Examples</h2> - -<h3 id="Specifying_a_downloadable_font">Specifying a downloadable font</h3> - -<p>This example simply specifies a downloadable font to use, applying it to the entire body of the document:</p> - -<p><a href="https://mdn.mozillademos.org/files/7775/webfont-sample.html">View the live example</a></p> - -<pre class="brush: html notranslate"><html> -<head> - <title>Web Font Sample</title> - <style type="text/css" media="screen, print"> - @font-face { - font-family: "Bitstream Vera Serif Bold"; - src: url("https://mdn.mozillademos.org/files/2468/VeraSeBd.ttf"); - } - - body { font-family: "Bitstream Vera Serif Bold", serif } - </style> -</head> -<body> - This is Bitstream Vera Serif Bold. -</body> -</html> -</pre> - -<p>In this example, the user's local copy of "Helvetica Neue Bold" is used; if the user does not have that font installed (two different names are tried), then the downloadable font named "MgOpenModernaBold.ttf" is used instead:</p> - -<pre class="brush: css notranslate">@font-face { - font-family: MyHelvetica; - src: local("Helvetica Neue Bold"), - local("HelveticaNeue-Bold"), - url(MgOpenModernaBold.ttf); - font-weight: bold; -} -</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('WOFF2.0', '', 'WOFF2 font format')}}</td> - <td>{{Spec2('WOFF2.0')}}</td> - <td>Font format specification with new compression algorithm</td> - </tr> - <tr> - <td>{{SpecName('WOFF1.0', '', 'WOFF font format')}}</td> - <td>{{Spec2('WOFF1.0')}}</td> - <td>Font format specification</td> - </tr> - <tr> - <td>{{SpecName('CSS3 Fonts', '#font-face-rule', '@font-face')}}</td> - <td>{{Spec2('CSS3 Fonts')}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("css.at-rules.font-face")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/WOFF">About WOFF</a></li> - <li><a href="https://everythingfonts.com/font-face">Everythingfonts font-face generator</a></li> - <li><a class="external" href="http://www.fontsquirrel.com/fontface/generator">FontSquirrel @font-face generator</a></li> - <li><a class="external" href="http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/">Beautiful fonts with @font-face</a></li> - <li><a class="external" href="http://openfontlibrary.org/">Open Font Library</a></li> - <li><a class="external" href="http://caniuse.com/woff">When can I use WOFF?</a></li> - <li><a class="external" href="http://caniuse.com/svg-fonts">When can I use SVG Fonts?</a></li> - <li><a href="https://coolfont.org">Free Fancy Cool Fonts</a></li> - <li><a href="https://nicknames.name/">Best Nicknames</a></li> -</ul> diff --git a/files/my/web/css/css_transitions/index.html b/files/my/web/css/css_transitions/index.html deleted file mode 100644 index 6f134a503b..0000000000 --- a/files/my/web/css/css_transitions/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: CSS Transitions -slug: Web/CSS/CSS_Transitions -tags: - - CSS - - CSS Transitions - - Overview - - Reference -translation_of: Web/CSS/CSS_Transitions ---- -<p>{{CSSRef}}</p> - -<p><strong>အသွင်ကူးပြောင်းမှု CSS ကိုကိုကို</strong> နျသနျသရငျညြတိကျတဲ့ဂုဏ်သတ္တိများ၏ CSS ကိုတန်ဖိုးများမွားထဲတွင်အကိုကိုကှားတဖြည်းဖြည်းအသွင်ကူးပြောင်းမှု ဖန်တီးပေးနိုင်ပါတယ်ဒါကတော့ CSS ကိုကိုတစ် module တစ်ခုတစ်ခုဖြစ်ပါတယ်။ အဲဒီအသွင်ကူးပြောင်းမှုများ၏အပြုအမူသူတို့ရဲ့ function ကိုကိုအချိန်ကိုက်, ကြာချိန်နှင့်အခြား attribute ကိုတွေသတ်မှတ်ခြင်းကထိန်းချုပ်ထားနိုင်ပါတယ်။</p> - -<h2 id="အညွှန်း">အညွှန်း</h2> - -<h3 id="ဂုဏ်သတ္တိများကို">ဂုဏ်သတ္တိများကို</h3> - -<div class="index"> -<ul> - <li>{{Cssxref("အကူးအပြောင်း")}}</li> - <li>{{Cssxref("အကူးအပြောင်း - နှောင့်နှေး")}}</li> - <li>{{Cssxref("အကူးအပြောင်း - ကြာချိန်")}}</li> - <li>{{Cssxref("အကူးအပြောင်း - အိမ်ခြံမြေ")}}</li> - <li>{{Cssxref("အကူးအပြောင်း - အချိန်ကိုက် -Function ကို")}}</li> -</ul> -</div> - -<h2 id="လမ်းညွှန်များ">လမ်းညွှန်များ</h2> - -<dl> - <dt><a href="/en-US/docs/Web/Guide/CSS/Using_CSS_transitions">CSS ကိုကိုအကူးအပြောင်းကိုအသုံးပြုခြင်း</a></dt> - <dd>Step-by-step CSS ကိုကိုသုံးပြီးအသွင်ကူးပြောင်းမှုကိုဖန်တီးရန်ဘယ်လိုသင်ခန်းစာ။ ဆောင်းပါးသည်တစြဤဦးချင်းစီကိုကို သက်ဆိုင်ရာ CSS ကိုပိုင်ဆိုင်မှုဖော်ပြထားသည်မွားကိုကိုနှငျ့သူတို့ကတစြ ဦးချင်းစီကတခြားတွေနဲ့အပြန်အလှန်ဘယ်လိုရှင်းပြ ။</dd> -</dl> - -<h2 id="အသေးစိတ်ဖော်ပြချက်">အသေးစိတ်ဖော်ပြချက်</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">သတ်မှတ်ချက်</th> - <th scope="col">အဆင့်အတန်း</th> - <th scope="col">မှတ်ချက်</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('CSS3 Transitions')}}</td> - <td>{{Spec2('CSS3 Transitions')}}</td> - <td>ကနဦးချက်နှင့်အဓိပ္ပါယ်။</td> - </tr> - </tbody> -</table> - -<h2 id="ကိုလည်းကြည့်ပါ">ကိုလည်းကြည့်ပါ</h2> - -<ul> - <li>CSS ကိုကိုကူးအပြောင်းကာလမှ Related, <a href="/en-US/docs/Web/CSS/CSS_Animations">CSS ကို Animation ရဲ့ကိုကို</a> ကာတွန်းဂုဏ်သတ္တိများကျော်အသေးစိတ်ထိန်းချုပ်ပေးရန်။</li> -</ul> diff --git a/files/my/web/css/index.html b/files/my/web/css/index.html deleted file mode 100644 index eb5e30fc56..0000000000 --- a/files/my/web/css/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: 'CSS: Cascading Style Sheets' -slug: Web/CSS -tags: - - CSS - - Cascading Style Sheets - - Design - - Landing - - Layout - - NeedsTranslation - - Reference - - Style Sheets - - Styles - - Stylesheets - - TopicStub - - 'l10n:priority' -translation_of: Web/CSS ---- -<div>{{CSSRef}}</div> - -<p class="summary"><span class="seoSummary"><strong>Cascading Style Sheets</strong> (<strong>CSS</strong>) is a <a href="/en-US/docs/DOM/stylesheet">stylesheet</a> language used to describe the presentation of a document written in <a href="/en-US/docs/Web/HTML" title="HyperText Markup Language">HTML</a></span> or <a href="/en-US/docs/XML_introduction">XML</a> (including XML dialects such as <a href="/en-US/docs/Web/SVG">SVG</a>, <a href="/en-US/docs/Web/MathML">MathML</a> or {{Glossary("XHTML", "", 1)}}). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.</p> - -<p>CSS is one of the core languages of the <strong>open Web</strong> and is standardized across Web browsers according to the <a class="external" href="http://w3.org/Style/CSS/#specs">W3C specification</a>. Developed in levels, CSS1 is now obsolete, CSS2.1 is a recommendation, and <a href="/en-US/docs/Web/CSS/CSS3" title="CSS3">CSS3</a>, now split into smaller modules, is progressing on the standardization track.</p> - -<section id="sect1"> -<ul class="card-grid"> - <li><span>CSS Introduction</span> - - <p>If you're new to web development, be sure to read our <a href="/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics">CSS basics</a> article to learn what CSS is and how to use it.</p> - </li> - <li><span>CSS Tutorials</span> - <p>Our <a href="/en-US/docs/Learn/CSS">CSS learning area</a> contains a wealth of tutorials to take you from beginner level to proficiency, covering all the fundamentals.</p> - </li> - <li><span>CSS Reference</span> - <p>Our <a href="/en-US/docs/Web/CSS/Reference">exhaustive CSS reference</a> for seasoned Web developers describes every property and concept of CSS.</p> - </li> -</ul> - -<div class="row topicpage-table"> -<div class="section"> -<h2 class="Documentation" id="Tutorials">Tutorials</h2> - -<p>Our <a href="/en-US/docs/Learn/CSS">CSS Learning Area</a> features multiple modules that teach CSS from the ground up — no previous knowledge required.</p> - -<dl> - <dt><a href="/en-US/docs/Learn/CSS/Introduction_to_CSS">Introduction to CSS</a></dt> - <dd>This module starts with the basics of how CSS works, including selectors and properties, writing CSS rules, applying CSS to HTML, how to specify length, color, and other units in CSS, cascade and inheritance, box model basics, and debugging CSS.</dd> - <dt><a href="/en-US/docs/Learn/CSS/Styling_text">Styling text</a></dt> - <dd>This module discusses text styling fundamentals, including setting fonts, boldness, italics, line and letter spacing, text drop shadows, and other text properties. This module finishes with applying custom fonts to your page, and styling lists and links.</dd> - <dt><a href="/en-US/docs/Learn/CSS/Styling_boxes">Styling boxes</a></dt> - <dd>This module looks at styling boxes, one of the fundamental steps towards laying out a web page. In this module we recap the box model, then look at controlling box layouts by setting margins, borders, and padding, custom background colors, images and other features, and fancy features such as drop shadows and filters on boxes.</dd> - <dt><a href="/en-US/docs/Learn/CSS/CSS_layout">CSS layout</a></dt> - <dd>At this point we've already looked at CSS fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside. Now it's time to look at how to place your boxes in the right place in relation to the viewport, and one another. We have covered the necessary prerequisites so you can now dive deep into CSS layout, looking at different display settings, traditional layout methods involving float and positioning, and newfangled layout tools like flexbox.</dd> -</dl> -</div> - -<div class="section"> -<h2 class="Tools" id="Reference">Reference</h2> - -<ul> - <li><a href="/en-US/docs/Web/CSS/Reference">CSS reference</a>: This exhaustive reference for seasoned Web developers describes every property and concept of CSS.</li> - <li>CSS key concepts: - <ul> - <li>The <a href="/en-US/docs/Web/CSS/Syntax">syntax and forms of the language</a></li> - <li><a href="/en-US/docs/Web/CSS/Specificity">Specificity</a>, <a href="/en-US/docs/Web/CSS/Inheritance">inheritance</a> and <a href="/en-US/docs/Web/CSS/Cascade">the Cascade</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Values_and_Units">CSS units and values</a></li> - <li><a href="/en-US/docs/Web/CSS/box_model">Box model</a> and <a href="/en-US/docs/Web/CSS/margin_collapsing">margin collapse</a></li> - <li>The <a href="/en-US/docs/Web/CSS/All_About_The_Containing_Block">containing block</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context" title="The stacking context">Stacking</a> and <a href="/en-US/docs/Web/CSS/block_formatting_context" title="block formatting context">block-formatting</a> contexts</li> - <li><a href="/en-US/docs/Web/CSS/initial_value">Initial</a>, <a href="/en-US/docs/Web/CSS/computed_value">computed</a>, <a href="/en-US/docs/Web/CSS/used_value">used</a>, and <a href="/en-US/docs/Web/CSS/actual_value">actual</a> values</li> - <li><a href="/en-US/docs/Web/CSS/Shorthand_properties">CSS shorthand properties</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout">CSS Flexible Box Layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout">CSS Grid Layout</a></li> - <li><a href="/en-US/docs/Web/CSS/Media_Queries">Media queries</a></li> - <li><a href="/en-US/docs/Web/CSS/animation">Animation</a></li> - </ul> - </li> -</ul> - -<h2 class="Tools" id="Cookbook">Cookbook</h2> - -<p>The <a href="/en-US/docs/Web/CSS/Layout_cookbook">CSS layout cookbook</a> aims to bring together recipes for common layout patterns, things you might need to implement in your own sites. In addition to providing code you can use as a starting point in your projects, these recipes highlight the different ways layout specifications can be used, and the choices you can make as a developer.</p> - -<h2 class="Tools" id="Tools_for_CSS_development">Tools for CSS development</h2> - -<ul> - <li>You can use the <a class="external" href="https://jigsaw.w3.org/css-validator/">W3C CSS Validation Service</a> to check if your CSS is valid. This is an invaluable debugging tool.</li> - <li><a href="/en-US/docs/Tools">Firefox Developer Tools</a> lets you view and edit a page's live CSS via the <a href="/en-US/docs/Tools/Page_Inspector">Inspector</a> and <a href="/en-US/docs/Tools/Style_Editor">Style Editor</a> tools.</li> - <li>The <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/web-developer/">Web Developer extension</a> for Firefox lets you track and edit live CSS on watched sites.</li> - <li>The Web community has created various other <a href="/en-US/docs/Web/CSS/Tools">miscellaneous CSS tools</a> for you to use.</li> -</ul> - -<h2 id="Meta_bugs">Meta bugs</h2> - -<ul> - <li>Firefox: {{bug(1323667)}}</li> -</ul> -</div> -</div> -</section> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/Demos_of_open_web_technologies#CSS">CSS demos</a>: Get a creative boost by exploring examples of the latest CSS technologies in action.</li> - <li>Web languages to which CSS is often applied: <a href="/en-US/docs/Web/HTML">HTML</a>, <a href="/en-US/docs/Web/SVG">SVG</a>, <a href="/en-US/docs/Web/MathML">MathML</a>, {{Glossary("XHTML", "", 1)}}, and <a href="/en-US/docs/XML_introduction">XML</a>.</li> - <li>Mozilla technologies that make extensive use of CSS: <a href="/en-US/docs/Mozilla/Tech/XUL">XUL</a>, <a href="/en-US/docs/Mozilla/Firefox">Firefox</a>, and <a href="/en-US/docs/Mozilla/Thunderbird">Thunderbird</a> <a href="/en-US/docs/Mozilla/Add-ons">extensions</a> and <a href="/en-US/docs/Mozilla/Add-ons/Themes">themes</a>.</li> - <li><a href="https://lists.mozilla.org/listinfo/dev-tech-layout">Mozilla mailing list</a></li> - <li><a href="Stack Overflow|http://stackoverflow.com/questions/tagged/css">Stack Overflow questions about CSS</a></li> -</ul> diff --git a/files/my/web/guide/index.html b/files/my/web/guide/index.html deleted file mode 100644 index 56e0fa9e82..0000000000 --- a/files/my/web/guide/index.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Web developer guide -slug: Web/Guide -tags: - - Guide - - Landing - - NeedsTranslation - - TopicStub - - Web -translation_of: Web/Guide ---- -<p><strong>These articles provide how-to information to help you make use of specific technologies and APIs.</strong></p> - -<div> -<div> -<div class="row topicpage-table"> -<div class="section"> -<dl> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS">CSS developer guide</a></dt> - <dd class="landingPageList">Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Events">Event developer guide</a></dt> - <dd class="landingPageList">Events refers both to a design pattern used for the asynchronous handling of various incidents which occur in the lifetime of a web page and to the naming, characterization, and use of a large number of incidents of different types.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Graphics">Graphics on the Web</a></dt> - <dd class="landingPageList">Modern Web sites and applications often need to present graphics.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API">Guide to Web APIs</a></dt> - <dd class="landingPageList">List all Web APIs and what they are doing</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML">HTML developer guide</a></dt> - <dd class="landingPageList"><strong>HyperText Markup Language (HTML)</strong> is the core language of nearly all Web content. Most of what you see on screen in your browser is described, fundamentally, using HTML.</dd> - <dt><a href="https://developer.mozilla.org/en-US/docs/JavaScript" title="/en-US/docs/JavaScript">JavaScript</a></dt> - <dd>JavaScript is the powerful scripting language used to create applications for the Web.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Localizations_and_character_encodings">Localizations and character encodings</a></dt> - <dd class="landingPageList">Browsers process text as Unicode internally. However, a way of representing characters in terms of bytes (character encoding) is used for transferring text over the network to the browser. The <a class="external external-icon" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset">HTML specification recommends</a> the use of the UTF-8 encoding (which can represent all of Unicode) and regardless of the encoding used requires Web content to declare what encoding was used.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Mobile">Mobile Web Development</a></dt> - <dd class="landingPageList">This page provides an overview of some of the main techniques needed to design web sites that work well on mobile devices. If you're looking for information on Mozilla's Firefox OS project, see the <a href="https://developer.mozilla.org/en/Mozilla/Firefox_OS" title="Boot to Gecko">Firefox OS</a> page. Or you might be interested in details about <a href="https://developer.mozilla.org/en/Mozilla/Firefox_for_Android" title="Firefox for Android">Firefox for Android</a>.</dd> -</dl> - -<dl> -</dl> -</div> - -<div class="section"> -<dl> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Performance">Optimization and performance</a></dt> - <dd class="landingPageList">When building modern Web apps and sites, it's important to make your content perform well. That is, to make it work quickly and efficiently. This lets it work effectively both for users of powerful desktop systems as well as for handheld devices with less power.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Parsing_and_serializing_XML">Parsing and serializing XML</a></dt> - <dd class="landingPageList">The Web platform provides the following objects for parsing and serializing XML:</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/SVG-in-OpenType">SVG-in-OpenType</a></dt> - <dd class="landingPageList">The SVG-in-OpenType work is currently in the hands of the <a class="external external-icon" href="http://mpeg.chiariglione.org/">MPEG group</a>. Once we're ready for wider adoption the information from <a class="external external-icon" href="https://wiki.mozilla.org/SVGOpenTypeFonts">wiki.mozilla.org</a> will be moved here, updated and expanded.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/WOFF">The Web Open Font Format (WOFF)</a></dt> - <dd class="landingPageList"><strong>WOFF</strong> (the <strong>Web Open Font Format</strong>) is a web font format developed by Mozilla in concert with Type Supply, LettError, and other organizations. It</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience">User experience</a></dt> - <dd class="landingPageList">Making the user experience of your Web site or app a pleasant one for your users is important if you want users to come back and use it again and again. Here you'll find articles that may help you along.</dd> - <dt class="landingPageList"><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects">Using FormData Objects</a></dt> - <dd class="landingPageList">The <a href="https://developer.mozilla.org/en/DOM/XMLHttpRequest/FormData" title="en/DOM/XMLHttpRequest/FormData"><code>FormData</code></a> object lets you compile a set of key/value pairs to send using <code>XMLHttpRequest</code>. Its primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data. The transmitted data is in the same format that the form's <code>submit()</code> method would use to send the data if the form's encoding type were set to "multipart/form-data".</dd> - <dt class="landingPageList"><a href="/en-US/docs/Glossary">Glossary</a></dt> - <dd class="landingPageList">Defines numerous technical terms related to the Web and Internet.</dd> -</dl> -</div> -</div> -</div> -</div> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/Reference" title="/en-US/docs/Web/Reference">Web Developer Reference</a></li> -</ul> diff --git a/files/my/web/http/connection_management_in_http_1.x/index.html b/files/my/web/http/connection_management_in_http_1.x/index.html deleted file mode 100644 index 201f93a64c..0000000000 --- a/files/my/web/http/connection_management_in_http_1.x/index.html +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Connection management in HTTP/1.x -slug: Web/HTTP/Connection_management_in_HTTP_1.x -translation_of: Web/HTTP/Connection_management_in_HTTP_1.x ---- -<div>{{HTTPSidebar}}</div> - -<p class="summary">การจัดการการเชื่อมต่อเป็นหัวข้อสำคัญใน HTTP: การเปิดและรักษาการเชื่อมต่อส่วนใหญ่มีผลต่อประสิทธิภาพของเว็บไซต์และแอปพลิเคชันเว็บ ใน HTTP / 1.x มีหลายโมเดล: <em>การเชื่อมต่อสั้น ๆ</em> , <em>การเชื่อมต่อแบบถาวร</em>และ<em>HTTP pipelining</em></p> - -<p>HTTP ส่วนใหญ่อาศัย TCP สำหรับโปรโตคอลการขนส่งโดยให้การเชื่อมต่อระหว่างไคลเอนต์และเซิร์ฟเวอร์ ในวัยเด็ก HTTP ใช้แบบจำลองเดียวเพื่อจัดการการเชื่อมต่อดังกล่าว การเชื่อมต่อเหล่านี้มีอายุการใช้งานสั้น: การเชื่อมต่อใหม่ที่สร้างขึ้นทุกครั้งที่จำเป็นต้องส่งคำขอและจะปิดเมื่อได้รับคำตอบ</p> - -<p>โมเดลที่เรียบง่ายนี้มีข้อ จำกัด ด้านประสิทธิภาพโดยธรรมชาติ: การเปิดการเชื่อมต่อ TCP แต่ละครั้งเป็นการดำเนินการที่ใช้ทรัพยากรมาก ต้องแลกเปลี่ยนข้อความหลายข้อความระหว่างไคลเอนต์และเซิร์ฟเวอร์ เวลาในการตอบสนองของเครือข่ายและแบนด์วิดท์มีผลต่อประสิทธิภาพเมื่อคำขอต้องการส่ง หน้าเว็บสมัยใหม่ต้องการคำขอจำนวนมาก (ตั้งแต่หนึ่งโหลขึ้นไป) เพื่อให้บริการข้อมูลตามจำนวนที่ต้องการซึ่งพิสูจน์ได้ว่ารุ่นก่อนหน้านี้ไม่มีประสิทธิภาพ</p> - -<p>รุ่นใหม่กว่าสองรุ่นถูกสร้างขึ้นใน HTTP / 1.1 โมเดลการเชื่อมต่อแบบต่อเนื่องช่วยให้การเชื่อมต่อเปิดระหว่างคำขอที่ต่อเนื่องลดเวลาที่ต้องใช้ในการเปิดการเชื่อมต่อใหม่ รูปแบบการไปป์ไลน์ HTTP ก้าวไปอีกขั้นด้วยการส่งคำขอต่อเนื่องหลายรายการโดยไม่ต้องรอคำตอบช่วยลดเวลาแฝงในเครือข่ายได้มาก</p> - -<p><img alt="Compares the performance of the three HTTP/1.x connection models: short-lived connections, persistent connections, and HTTP pipelining." src="https://mdn.mozillademos.org/files/13727/HTTP1_x_Connections.png" style="height: 538px; width: 813px;"></p> - -<div class="note"> -<p>HTTP / 2 เพิ่มโมเดลเพิ่มเติมสำหรับการจัดการการเชื่อมต่อ</p> -</div> - -<p>It's important point to note that connection management in HTTP applies to the connection between two consecutive nodes, which is <a href="/en-US/docs/Web/HTTP/Headers#hbh">hop-by-hop</a> and not <a href="/en-US/docs/Web/HTTP/Headers#e2e">end-to-end</a>. The model used in connections between a client and its first proxy may differ from the model between a proxy and the destination server (or any intermediate proxies). The HTTP headers involved in defining the connection model, like {{HTTPHeader("Connection")}} and {{HTTPHeader("Keep-Alive")}}, are <a href="/en-US/docs/Web/HTTP/Headers#hbh">hop-by-hop</a> headers with their values able to be changed by intermediary nodes.</p> - -<p>A related topic is the concept of HTTP connection upgrades, wherein an HTTP/1.1 connection is upgraded to a different protocol, such as TLS/1.0, WebSocket, or even HTTP/2 in cleartext. This <a href="/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism">protocol upgrade mechanism</a> is documented in more detail elsewhere.</p> - -<h2 id="Short-lived_connections">Short-lived connections</h2> - -<p>The original model of HTTP, and the default one in HTTP/1.0, is <em>short-lived connections</em>. Each HTTP request is completed on its own connection; this means a TCP handshake happens before each HTTP request, and these are serialized.</p> - -<p>The TCP handshake itself is time-consuming, but a TCP connection adapts to its load, becoming more efficient with more sustained (or warm) connections. Short-lived connections do not make use of this efficiency feature of TCP, and performance degrades from optimum by persisting to transmit over a new, cold connection.</p> - -<p>This model is the default model used in HTTP/1.0 (if there is no {{HTTPHeader("Connection")}} header, or if its value is set to <code>close</code>). In HTTP/1.1, this model is only used when the {{HTTPHeader("Connection")}} header is sent with a value of <code>close</code>.</p> - -<div class="note"> -<p>Unless dealing with a very old system, which doesn't support a persistent connection, there is no compelling reason to use this model.</p> -</div> - -<h2 id="Persistent_connections">Persistent connections</h2> - -<p>Short-lived connections have two major hitches: the time taken to establish a new connection is significant, and performance of the underlying TCP connection gets better only when this connection has been in use for some time (warm connection). To ease these problems, the concept of a <em>persistent connection</em> has been designed, even prior to HTTP/1.1. Alternatively this may be called a <em>keep-alive connection</em>.</p> - -<p>A persistent connection is one which remains open for a period of time, and can be reused for several requests, saving the need for a new TCP handshake, and utilizing TCP's performance enhancing capabilities. This connection will not stay open forever: idle connections are closed after some time (a server may use the {{HTTPHeader("Keep-Alive")}} header to specify a minimum time the connection should be kept open).</p> - -<p>Persistent connections also have drawbacks; even when idling they consume server resources, and under heavy load, {{glossary("DoS attack", "DoS attacks")}} can be conducted. In such cases, using non-persistent connections, which are closed as soon as they are idle, can provide better performance.</p> - -<p>HTTP/1.0 connections are not persistent by default. Setting {{HTTPHeader("Connection")}} to anything other than <code>close</code>, usually <code>retry-after</code>, will make them persistent.</p> - -<p>In HTTP/1.1, persistence is the default, and the header is no longer needed (but it is often added as a defensive measure against cases requiring a fallback to HTTP/1.0).</p> - -<h2 id="HTTP_pipelining">HTTP pipelining</h2> - -<div class="note"> -<p>HTTP pipelining is not activated by default in modern browsers:</p> - -<ul> - <li>Buggy <a href="https://en.wikipedia.org/wiki/Proxy_server">proxies</a> are still common and these lead to strange and erratic behaviors that Web developers cannot foresee and diagnose easily.</li> - <li>Pipelining is complex to implement correctly: the size of the resource being transferred, the effective <a href="https://en.wikipedia.org/wiki/Round-trip_delay_time">RTT</a> that will be used, as well as the effective bandwidth, have a direct incidence on the improvement provided by the pipeline. Without knowing these, important messages may be delayed behind unimportant ones. The notion of important even evolves during page layout! HTTP pipelining therefore brings a marginal improvement in most cases only.</li> - <li>Pipelining is subject to the <a href="https://en.wikipedia.org/wiki/Head-of-line_blocking">HOL</a> problem.</li> -</ul> - -<p>For these reasons, pipelining has been superseded by a better algorithm, <em>multiplexing</em>, that is used by HTTP/2.</p> -</div> - -<p>By default, <a href="/en-US/docs/Web/HTTP" title="en/HTTP">HTTP</a> requests are issued sequentially. The next request is only issued once the response to the current request has been received. As they are affected by network latencies and bandwidth limitations, this can result in significant delay before the next request is <em>seen</em> by the server.</p> - -<p>Pipelining is the process to send successive requests, over the same persistent connection, without waiting for the answer. This avoids latency of the connection. Theoretically, performance could also be improved if two HTTP requests were to be packed into the same TCP message. The typical <a href="https://en.wikipedia.org/wiki/Maximum_segment_size">MSS</a> (Maximum Segment Size), is big enough to contain several simple requests, although the demand in size of HTTP requests continues to grow.</p> - -<p>Not all types of HTTP requests can be pipelined: only {{glossary("idempotent")}} methods, that is {{HTTPMethod("GET")}}, {{HTTPMethod("HEAD")}}, {{HTTPMethod("PUT")}} and {{HTTPMethod("DELETE")}}, can be replayed safely: should a failure happen, the pipeline content can simply be repeated.</p> - -<p>Today, every HTTP/1.1-compliant proxy and server should support pipelining, though many have limitations in practice: a significant reason no modern browser activates this feature by default.</p> - -<h2 id="Domain_sharding">Domain sharding</h2> - -<div class="note"> -<p>Unless you have a very specific immediate need, don't use this deprecated technique; switch to HTTP/2 instead. In HTTP/2, domain sharding is no longer useful: the HTTP/2 connection is able to handle parallel unprioritized requests very well. Domain sharding is even detrimental to performance. Most HTTP/2 implementations use a technique called <a href="https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing/">connection coalescing</a> to revert eventual domain sharding.</p> -</div> - -<p>As an HTTP/1.x connection is serializing requests, even without any ordering, it can't be optimal without large enough available bandwidth. As a solution, browsers open several connections to each domain, sending parallel requests. Default was once 2 to 3 connections, but this has now increased to a more common use of 6 parallel connections. There is a risk of triggering <a href="/en-US/docs/Glossary/DOS_attack">DoS</a> protection on the server side if attempting more than this number.</p> - -<p>หากเซิร์ฟเวอร์ต้องการให้เว็บไซต์หรือแอปพลิเคชันตอบสนองเร็วขึ้นเซิร์ฟเวอร์อาจบังคับให้เปิดการเชื่อมต่อเพิ่มเติม ตัวอย่างเช่นแทนที่จะมีทรัพยากรทั้งหมดในโดเมนเดียวกันพูดก็อาจแบ่งมากกว่าหลายโดเมน,<code>www.example.com</code> , , แต่ละโดเมนเหล่านี้แก้ไขไปยังเซิร์ฟเวอร์<em>เดียวกัน</em>และเว็บเบราว์เซอร์จะเปิดการเชื่อมต่อ 6 รายการให้กับแต่ละโดเมน(ในตัวอย่างของเราเพิ่มการเชื่อมต่อเป็น 18) เทคนิคนี้เรียกว่าsharding<em> โดเมน</em><code>www1.example.com</code><code>www2.example.com</code><code>www3.example.com</code></p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/13783/HTTPSharding.png" style="height: 727px; width: 463px;"></p> - -<h2 id="สรุป">สรุป</h2> - -<p>การจัดการการเชื่อมต่อที่ได้รับการปรับปรุงช่วยเพิ่มประสิทธิภาพใน HTTP ได้มาก ด้วย HTTP / 1.1 หรือ HTTP / 1.0 การใช้การเชื่อมต่อแบบต่อเนื่องอย่างน้อยก็จนกว่าจะไม่มีการใช้งานจะนำไปสู่ประสิทธิภาพที่ดีที่สุด อย่างไรก็ตามความล้มเหลวของการวางท่อนำไปสู่การออกแบบรูปแบบการจัดการการเชื่อมต่อที่เหนือกว่าซึ่งรวมอยู่ใน HTTP / 2</p> diff --git a/files/my/web/http/index.html b/files/my/web/http/index.html deleted file mode 100644 index 6e893c3ced..0000000000 --- a/files/my/web/http/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: HTTP -slug: Web/HTTP -tags: - - HTTP - - Hypertext - - NeedsTranslation - - Reference - - TCP/IP - - TopicStub - - Web - - Web Development - - 'l10n:priority' -translation_of: Web/HTTP ---- -<div>{{HTTPSidebar}}</div> - -<p class="summary"><strong><dfn>Hypertext Transfer Protocol (HTTP)</dfn></strong> is an <a href="https://en.wikipedia.org/wiki/Application_Layer">application-layer</a> protocol for transmitting hypermedia documents, such as HTML. It was designed for communication between web browsers and web servers, but it can also be used for other purposes. HTTP follows a classical <a href="https://en.wikipedia.org/wiki/Client%E2%80%93server_model">client-server model</a>, with a client opening a connection to make a request, then waiting until it receives a response. HTTP is a <a href="https://en.wikipedia.org/wiki/Stateless_protocol">stateless protocol</a>, meaning that the server does not keep any data (state) between two requests. Though often based on a TCP/IP layer, it can be used on any reliable <a href="https://en.wikipedia.org/wiki/Transport_Layer">transport layer</a>, that is, a protocol that doesn't lose messages silently like UDP does. <a href="https://en.wikipedia.org/wiki/Reliable_User_Datagram_Protocol">RUDP</a> — the reliable update of UDP — is a suitable alternative.</p> - -<div class="column-container"> -<div class="column-half"> -<h2 id="Tutorials">Tutorials</h2> - -<p>Learn how to use HTTP with guides and tutorials.</p> - -<dl> - <dt><a href="/en-US/docs/Web/HTTP/Overview">Overview of HTTP</a></dt> - <dd>The basic features of the client-server protocol: what it can do and its intended uses.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Caching">HTTP Cache</a></dt> - <dd>Caching is very important for fast Web sites. This article describes different methods of caching and how to use HTTP Headers to control them.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Cookies">HTTP Cookies</a></dt> - <dd>How cookies work is defined by <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>. When serving an HTTP request, a server can send a <code>Set-Cookie</code> HTTP header with the response. The client then returns the cookie's value with every request to the same server in the form of a <code>Cookie</code> request header. The cookie can also be set to expire on a certain date, or restricted to a specific domain and path.</dd> - <dt><a href="/en-US/docs/Web/HTTP/CORS">Cross-Origin Resource Sharing (CORS)</a></dt> - <dd><strong>Cross-site HTTP requests</strong> are HTTP requests for resources from a <strong>different domain</strong> than the domain of the resource making the request. For instance, an HTML page from Domain A (<code>http://domaina.example/</code>) makes a request for an image on Domain B (<code>http://domainb.foo/image.jpg</code>) via the <code>img</code> element. Web pages today very commonly load cross-site resources, including CSS stylesheets, images, scripts, and other resources. CORS allows web developers to control how their site reacts to cross-site requests.</dd> -</dl> - -<dl> - <dt><a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP">Evolution of HTTP</a></dt> - <dd>A brief description of the changes between the early versions of HTTP, to the modern HTTP/2, the emergent HTTP/3 and beyond.</dd> - <dt><a href="https://wiki.mozilla.org/Security/Guidelines/Web_Security">Mozilla web security guidelines</a></dt> - <dd>A collection of tips to help operational teams with creating secure web applications.</dd> -</dl> - -<dl> - <dt><a href="/en-US/docs/Web/HTTP/Messages">HTTP Messages</a></dt> - <dd>Describes the type and structure of the different kind of messages of HTTP/1.x and HTTP/2.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Session">A typical HTTP session</a></dt> - <dd>Shows and explains the flow of a usual HTTP session.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Connection_management_in_HTTP_1.x">Connection management in HTTP/1.x</a></dt> - <dd>Describes the three connection management models available in HTTP/1.x, their strengths, and their weaknesses.</dd> -</dl> -</div> - -<div class="column-half"> -<h2 id="Reference">Reference</h2> - -<p>Browse through detailed HTTP reference documentation.</p> - -<dl> - <dt><a href="/en-US/docs/Web/HTTP/Headers">HTTP Headers</a></dt> - <dd>HTTP message headers are used to describe a resource, or the behavior of the server or the client. Custom proprietary headers can be added using the <code>X-</code> prefix; others in an <a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml#perm-headers">IANA registry</a>, whose original content was defined in <a href="https://tools.ietf.org/html/rfc4229">RFC 4229</a>. IANA also maintains a <a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml#prov-headers">registry of proposed new HTTP message headers</a>.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Methods">HTTP Request Methods</a></dt> - <dd>The different operations that can be done with HTTP: {{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, and also less common requests like {{HTTPMethod("OPTIONS")}}, {{HTTPMethod("DELETE")}}, or {{HTTPMethod("TRACE")}}.</dd> - <dt><a href="/en-US/docs/Web/HTTP/Response_codes">HTTP Status Response Codes</a></dt> - <dd>HTTP response codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: informational responses, successful responses, redirections, client errors, and servers errors.</dd> -</dl> - -<dl> - <dt><a href="/en-US/docs/Web/HTTP/Headers/Content-Security-Policy">CSP directives</a></dt> - <dd>The {{HTTPHeader("Content-Security-Policy")}} response header fields allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.</dd> -</dl> - -<h2 id="Tools_resources">Tools & resources</h2> - -<p>Helpful tools and resources for understanding and debugging HTTP.</p> - -<dl> - <dt><a href="/en-US/docs/Tools">Firefox Developer Tools</a></dt> - <dd><a href="/en-US/docs/Tools/Network_Monitor">Network monitor</a></dd> - <dt><a href="https://observatory.mozilla.org/">Mozilla Observatory</a></dt> - <dd> - <p>A project designed to help developers, system administrators, and security professionals configure their sites safely and securely.</p> - </dd> - <dt><a class="external" href="https://redbot.org/">RedBot</a></dt> - <dd>Tools to check your cache-related headers</dd> - <dt><a href="https://www.html5rocks.com/en/tutorials/internals/howbrowserswork/">How Browsers Work</a></dt> - <dd>A very comprehensive article on browser internals and request flow through HTTP protocol. A MUST-READ for any web developer.</dd> -</dl> -</div> -</div> diff --git a/files/my/web/index.html b/files/my/web/index.html deleted file mode 100644 index 3b55338e60..0000000000 --- a/files/my/web/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Web developers နင့္ နည္းပညာ မျာ -slug: Web -tags: - - Landing - - NeedsTranslation - - TopicStub - - Web -translation_of: Web ---- -<p>The open Web presents incredible opportunities for developers. To take full advantage of these technologies, you need to know how to use them. Below you'll find the links to MDN's documentation on Web technologies.</p> - -<p> </p> - -<p>လွတ်လပ်စ</p> - -<p> </p> - -<p> </p> - -<div class="row topicpage-table"> -<div class="section"> -<h2 class="Documentation" id="Web_နည်းပညာများ">Web နည်းပညာများ</h2> - -<h3 id="အခြေခံ">အခြေခံ</h3> - -<dl> - <dt><a href="/en-US/docs/Web/HTML">HTML</a></dt> - <dd>၀ဘ်စာမျက်နာတစ်ခုတွင် ပါ၀င်သောအကြောင်းအရာများအား စနစ်ကျတဲ့ ဖွဲ့စည်းပုံ ကို သက်မတ်ရန် အသုံးပြုသောနည်းပညာ တစ်ခုဖြစ်ပါသည။</dd> - <dt><a href="/en-US/docs/Web/CSS">CSS</a></dt> - <dd> ၀ဘ်စာမျက်နာပါအကြောင်းအရာများရဲ့ အသွင်အပြင်ကို ဖော်ပြဖို့အတွက်သုံးသည်။</dd> -</dl> - -<h3 id="Scripting">Scripting</h3> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript">JavaScript</a></dt> - <dd>JavaScript is the programming language that runs in the browser, which is used to build advanced user interactive Web sites and applications.</dd> - <dt><a href="/en-US/docs/Web/Reference/API">Web APIs</a></dt> - <dd>Reference material for each of the individual APIs that comprise the Web's powerful scriptability, including the <a href="/en-US/docs/DOM">DOM</a> and all of the related APIs and interfaces you can use to build Web content and apps. - <ul> - <li><a href="/en-US/docs/Web/API" title="/en-US/docs/Web/API">Web API interface reference</a> - all interfaces, arranged alphabetically.</li> - <li><a href="/en-US/docs/WebAPI">WebAPI</a> page lists device access APIs and other APIs useful for applications.</li> - </ul> - </dd> -</dl> - -<h3 id="Graphics">Graphics</h3> - -<dl> - <dt><a href="/en-US/docs/SVG">SVG</a></dt> - <dd>Scalable Vector Graphics let you describe images as sets of vectors (lines) and shapes in order to allow them to scale smoothly regardless of the size at which they're drawn.</dd> - <dt><a href="/en-US/docs/Web/WebGL" title="/en-US/docs/Web/WebGL">WebGL</a></dt> - <dd>WebGL brings 3D graphics to the Web by introducing an API that closely conforms to OpenGL ES 2.0, and which can be used in HTML {{HTMLElement("canvas")}} elements.</dd> -</dl> - -<h3 id="Other">Other</h3> - -<dl> - <dt><a href="/en-US/docs/Web/MathML">MathML</a></dt> - <dd>The Mathematical Markup Language makes it possible to display complex mathematical equations and syntax.</dd> -</dl> -</div> - -<div class="section"> -<h2 class="Documentation" id="Documentation_by_type">Documentation by type</h2> - -<dl> - <dt><a href="/en-US/docs/Web/Guide">Web Developer Guide</a></dt> - <dd>The Web Developer Guide provides useful how-to content to help you actually use Web technologies to do what you want or need to do.</dd> - <dt><a href="/en-US/docs/Web/Tutorials">Tutorials for Web developers</a></dt> - <dd>A list of tutorials to take you step-by-step through learning APIs, technologies, or broad topic areas.</dd> - <dt><a href="/en-US/docs/Web/Reference">References</a></dt> - <dd><em>This page will offer links to all reference information on MDN, but for now use one of the technology links in the left section.</em></dd> -</dl> - -<h2 id="Other_topics">Other topics</h2> - -<dl> - <dt><a href="/en-US/docs/Web/Apps">Developing Web applications</a></dt> - <dd>Documentation for Web application developers; Web apps are true write-once, deploy anywhere apps for mobile, desktop, and Firefox OS.</dd> - <dt><a href="/en-US/docs/Web/Accessibility">Accessibility</a></dt> - <dd>Accessibility in Web development means enabling as many people as possible to use Web sites, even when those people's abilities are limited in some way. Here we provide information on developing Web content to be accessible.</dd> - <dt><a href="/en-US/docs/Web/Security">Security</a></dt> - <dd>Ensuring that your Web site or open Web app is secure is critical.</dd> -</dl> -</div> -</div> - -<p><span class="alllinks"><a href="/en-US/docs/tag/Web">View All...</a></span></p> diff --git a/files/my/web/javascript/index.html b/files/my/web/javascript/index.html deleted file mode 100644 index d26ea34fb6..0000000000 --- a/files/my/web/javascript/index.html +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: JavaScript -slug: Web/JavaScript -tags: - - JavaScript - - Landing - - NeedsTranslation - - TopicStub -translation_of: Web/JavaScript ---- -<div>{{JsSidebar}}</div> - -<p class="summary"><strong>JavaScript</strong><sup>®</sup> (အတိုကောက် <strong>JS</strong>) ဆိုတာ <a href="https://en.wikipedia.org/wiki/First-class_functions" title="https://en.wikipedia.org/wiki/First-class_functions">first-class functions </a> နှင့်တည်ဆောက်ထား တဲ့a lightweight, interpreted, object-oriented language တစ်ခုဖြစ်ပါတယ်။အများက သိတာကတော့ web pages တွေအတွက် browser ကိုအခြေ ခံထားတဲ့ scripting language တစ်ခုအနေနဲ့သိကြတယ် ဒါပေမဲ့ browser ကိုအခြေခံ မထားတဲ့ <a class="external" href="https://en.wikipedia.org/wiki/JavaScript#Uses_outside_web_pages">နေရာ</a> တွေဖြစ်တဲ့ <a class="external" href="https://nodejs.org/">node.js</a> ဒါမှမဟုတ် <a href="https://couchdb.apache.org/">Apache CouchDB</a> တွေမှာလဲအသုံးပြု ပါတယ်. Javascript ဟာ <a class="mw-redirect" href="https://en.wikipedia.org/wiki/Prototype-based_programming" title="Prototype-based">prototype-based</a>, multi-paradigm scripting language ဖြစ်ပါတယ်၊ ဆိုလိုတာက dynamic ဖြစ်သလို object-oriented, imperative, and functional programming ရေးသားနည်းပုံစံနဲ့လည်း ထောက်ပံပေးပါတယ်။ အသေးစိတ်ကိုတော့ <a href="/en-US/docs/Web/JavaScript/About_JavaScript">JavaScript</a> အကြောင်း ပိုမို ဖတ်ရှုကြည့်ပါ။</p> - -<p>JavaScript စံသတ်မှတ်ချက်ကို <a href="/en-US/docs/JavaScript/Language_Resources">ECMAScript</a> လို့ခေါ်ပါတယ်။ ၂၀၁၂ မှာ modern browsers တွေအကုန်လုံးက ECMAScript 5.1 ကို အပြည့်အဝ support ပေးနေပါပြီ။ Browsers အဟောင်းတွေက အနည်းဆုံး ECMAScript 3 ကို support ပေးပါတယ်။ ဇွန်လ ၁၇ ရက် ၂၀၁၅ မှာ ခြောက်ကြိမ်မြောက် ECMAScript ကို ကြေငြာပြဌာန်းလိုက်ပါတယ်။ အဲ့ဒီ့ version ကို ECMAScript 2015 လို့တရားဝင်ခေါ်ပါတယ်၊ ဒါပေမယ့်လည်း ECMAScript 6 ဒါမှမဟုတ် ES6 ဆိုပြီးလည်းခေါ်ပါတယ်။</p> - -<p> ဒီဝက်စာမျက်နှာမှာတော့ JavaScript အကြောင်းကိုပဲ ပြောပြသွားမှာဖြစ်ပါတယ်။Web Pages နဲ့ ဆက်စပ်ပြီးသုံးတဲ့ ဒါမှမဟုတ် တစ်ခြားသော Host Environment နဲ့ စပ်ဆက်ပြီးသုံးတဲ့ အကြောင်းကို ပြောမှ မဟုတ်ပါဘူး။. Web pages နဲ့ စပ်ဆက်ပြီး အသုံးပြုတဲ့ {{Glossary("API","APIs")}} ကို လေ့လာချင်တဲ့ဆိုရင်တော့ <a href="/en-US/docs/Web/API">Web APIs</a> နဲ့ <a href="/en-US/docs/Glossary/DOM">DOM</a> မှာ သွားရောက် လေ့လာလို့ရပါတယ်။</p> - -<p>JavaScript ကို <a href="https://en.wikipedia.org/wiki/Java_(programming_language)">Java programming language</a> နဲ့ မတူဘူးဆိုတာ သိထားဖို့လိုပါမယ်။ Java ဆိုတာ U.S. နဲ့ အခြားသောနိုင်ငံတွေမှာ Oracle က မူပိုင်တင်ထားပါတယ်။</p> - -<div class="column-container"> -<div class="column-half"> -<h2 id="နည်းပြသင်ခန်းစာများ">နည်းပြသင်ခန်းစာများ</h2> - -<p>ကျွန်တော်တို့ရဲ့ နည်းပြသင်ခန်းစာများနဲ့ လေ့ကျင့်ခန်းများမှတစ်ဆင့် JavaScript နဲ့ဘယ်လို program လုပ်မလဲဆိုတာလေ့လာပါ။</p> - -<h3 id="နိဒါန်း">နိဒါန်း</h3> - -<dl> - <dt><a href="/my/docs/Web/JavaScript/Guide">JavaScript လမ်းညွှန်</a></dt> - <dd>သင်က JavaScript ကိုအခုမှစတင်လေ့လာမယ့်သူဆိုရင် ဒီလမ်းညွှန်ကသင့်ကိုအထောက်အကူပြုပါလိမ့်မယ်။ </dd> - <dt></dt> - <dt><a href="/en-US/docs/Web/JavaScript/JavaScript_technologies_overview">JavaScript နည်းပညာချုံငုံသုံးသပ်ချက်</a></dt> - <dd>Web browser နဲ့ JavaScript landscape မိတ်ဆက်။</dd> - <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript">Object Oriented JavaScript မိတ်ဆက်</a></dt> - <dd>Introduction to the concepts of object oriented programming in JavaScript.</dd> -</dl> - -<h3 id="Intermediate">Intermediate</h3> - -<dl> - <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript">A re-introduction to JavaScript</a></dt> - <dd>An overview for those who <em>think</em> they know about JavaScript.</dd> -</dl> - -<dl> - <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures">JavaScript data structures</a></dt> - <dd>Overview of available data structures in JavaScript.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness">Equality comparisons and sameness</a></dt> - <dd>JavaScript provides three different value-comparison operations: strict equality using <code>===</code>, loose equality using <code>==</code>, and the {{jsxref("Global_Objects/Object/is", "Object.is()")}} method.</dd> -</dl> - -<h3 id="Advanced">Advanced</h3> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain">Inheritance and the prototype chain</a></dt> - <dd>Explanation of the widely misunderstood and under-estimated prototype-based inheritance.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></dt> - <dd>A restricted variant of JavaScript.</dd> - <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays">JavaScript typed arrays</a></dt> - <dd>JavaScript typed arrays provide a mechanism for accessing raw binary data.</dd> - <dt><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management">Memory Management</a></dt> - <dd>Memory life cycle and garbage collection in JavaScript.</dd> -</dl> -</div> - -<div class="column-half"> -<h2 id="အညွှန်း">အညွှန်း</h2> - -<p>Browse the complete <a href="/en-US/docs/Web/JavaScript/Reference">JavaScript reference</a> documentation. </p> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects">Standard objects</a></dt> - <dd>Get to know standard built-in objects <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="The JavaScript Array global object is a constructor for arrays, which are high-level, list-like objects."><code>Array</code></a></code>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="The Boolean object is an object wrapper for a boolean value."><code>Boolean</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" title="Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January, 1970 UTC."><code>Date</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" title="The Error constructor creates an error object. Instances of Error objects are thrown when runtime errors occur. The Error object can also be used as a base objects for user-defined exceptions. See below for standard built-in error types."><code>Error</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" title="The Function constructor creates a new Function object. In JavaScript every function is actually a Function object."><code>Function</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON" title="The JSON object contains methods for parsing JavaScript Object Notation (JSON) and converting values to JSON. It can't be called or constructed, and aside from its two method properties it has no interesting functionality of its own."><code>JSON</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="Math is a built-in object that has properties and methods for mathematical constants and functions. Not a function object."><code>Math</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor."><code>Number</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>Object</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>RegExp</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="The String global object is a constructor for strings, or a sequence of characters."><code>String</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object is a simple key/value map. Any value (both objects and primitive values) may be used as either a key or a value."><code>Map</code></a>, <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set">Set</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are objects and the values can be arbitrary values."><code>WeakMap</code></a></code>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet" title="The WeakSet object lets you store weakly held objects in a collection."><code>WeakSet</code></a>, and others.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Operators">Expressions and operators</a></dt> - <dd>Learn more about the behavior of JavaScript's operators <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof">instanceof</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof">typeof</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new">new</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this">this</a></code>, the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">operator precedence</a>, and more.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Statements">Statements and declarations</a></dt> - <dd>Learn how <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while">do-while</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in">for-in</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for-of</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch">try-catch</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var">var</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else">if-else</a></code>, <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch">switch</a></code>, and more JavaScript statements and keywords work.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Functions">Functions</a></dt> - <dd>Learn how to work with JavaS functions to develop your applications.</dd> -</dl> - -<h2 id="Tools_resources">Tools & resources</h2> - -<p>Helpful tools while writing and debugging your JavaScript code.</p> - -<dl> - <dt><a href="/en-US/docs/Tools">Firefox Developer Tools</a></dt> - <dd><a href="/en-US/docs/Tools/Scratchpad">Scratchpad</a>, <a href="/en-US/docs/Tools/Web_Console">Web Console</a>, <a href="/en-US/docs/Tools/Profiler">JavaScript Profiler</a>, <a href="/en-US/docs/Tools/Debugger">Debugger</a>, and more.</dd> - <dt><a class="external" href="http://www.getfirebug.com/">Firebug</a></dt> - <dd>Edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Shells">JavaScript Shells</a></dt> - <dd>A JavaScript shell allows you to quickly test snippets of JavaScript code.</dd> - <dt><a href="https://togetherjs.com/">TogetherJS</a></dt> - <dd> - <p class="hero-header-text large">Collaboration made easy.</p> - </dd> - <dt><a href="http://stackoverflow.com/questions/tagged/javascript">Stack Overflow</a></dt> - <dd>Stack Overflow questions tagged with "JavaScript".</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript">JavaScript versions and release notes</a></dt> - <dd>Browse JavaScript's feature history and implementation status.</dd> -</dl> -</div> -</div> diff --git a/files/my/web/javascript/reference/index.html b/files/my/web/javascript/reference/index.html deleted file mode 100644 index 1345585f85..0000000000 --- a/files/my/web/javascript/reference/index.html +++ /dev/null @@ -1,312 +0,0 @@ ---- -title: JavaScript reference -slug: Web/JavaScript/Reference -tags: - - Code - - ECMAScript - - ECMAScript6 - - ES6 - - JS - - JavaScript - - Landing page - - NeedsTranslation - - Reference - - TopicStub - - es - - 'l10n:priority' - - programming -translation_of: Web/JavaScript/Reference ---- -<div>{{JsSidebar}}</div> - -<p>This part of the JavaScript section on MDN serves as a repository of facts about the JavaScript language. Read more <a href="/en-US/docs/Web/JavaScript/Reference/About">about this reference</a>.</p> - -<h2 id="Built-ins">Built-ins</h2> - -<p><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects">JavaScript standard built-in objects</a>, along with their methods and properties.</p> - -<ul class="card-grid"> - <li><span>Value properties</span> - - <p>{{JSxRef("Infinity")}}<br> - {{JSxRef("NaN")}}<br> - {{JSxRef("undefined")}}<br> - {{JSxRef("globalThis")}}</p> - </li> - <li><span>Function properties</span> - <p>{{JSxRef("Global_Objects/eval", "eval()")}}<br> - {{JSxRef("Global_Objects/isFinite", "isFinite()")}}<br> - {{JSxRef("Global_Objects/isNaN", "isNaN()")}}<br> - {{JSxRef("Global_Objects/parseFloat", "parseFloat()")}}<br> - {{JSxRef("Global_Objects/parseInt", "parseInt()")}}<br> - {{JSxRef("Global_Objects/decodeURI", "decodeURI()")}}<br> - {{JSxRef("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}<br> - {{JSxRef("Global_Objects/encodeURI", "encodeURI()")}}<br> - {{JSxRef("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</p> - </li> - <li><span>Fundamental objects</span> - <p>{{JSxRef("Object")}}<br> - {{JSxRef("Function")}}<br> - {{JSxRef("Boolean")}}<br> - {{JSxRef("Symbol")}}</p> - </li> - <li><span>Error objects</span> - <p>{{JSxRef("Error")}}<br> - {{JSxRef("AggregateError")}}<br> - {{JSxRef("EvalError")}}<br> - {{JSxRef("InternalError")}}<br> - {{JSxRef("RangeError")}}<br> - {{JSxRef("ReferenceError")}}<br> - {{JSxRef("SyntaxError")}}<br> - {{JSxRef("TypeError")}}<br> - {{JSxRef("URIError")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>Numbers & dates</span> - - <p>{{JSxRef("Number")}}<br> - {{JSxRef("BigInt")}}<br> - {{JSxRef("Math")}}<br> - {{JSxRef("Date")}}</p> - </li> - <li><span>Text processing</span> - <p>{{JSxRef("String")}}<br> - {{JSxRef("RegExp")}}</p> - </li> - <li><span>Indexed Collections</span><a href="/en-US/docs/Web/JavaScript/Guide/Numbers_and_dates#Numbers"> </a>{{JSxRef("Array")}}<br> - {{JSxRef("Int8Array")}}<br> - {{JSxRef("Uint8Array")}}<br> - {{JSxRef("Uint8ClampedArray")}}<br> - {{JSxRef("Int16Array")}}<br> - {{JSxRef("Uint16Array")}}<br> - {{JSxRef("Int32Array")}}<br> - {{JSxRef("Uint32Array")}}<br> - {{JSxRef("Float32Array")}}<br> - {{JSxRef("Float64Array")}}<br> - {{JSxRef("BigInt64Array")}}<br> - {{JSxRef("BigUint64Array")}}</li> - <li><span>Keyed collections</span> - <p>{{JSxRef("Map")}}<br> - {{JSxRef("Set")}}<br> - {{JSxRef("WeakMap")}}<br> - {{JSxRef("WeakSet")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>Structured data</span> - - <p>{{JSxRef("ArrayBuffer")}}<br> - {{JSxRef("SharedArrayBuffer")}}<br> - {{JSxRef("Atomics")}}<br> - {{JSxRef("DataView")}}<br> - {{JSxRef("JSON")}}</p> - </li> - <li><span>Control abstraction</span> - <p>{{JSxRef("Promise")}}<br> - {{JSxRef("Generator")}}<br> - {{JSxRef("GeneratorFunction")}}<br> - {{JSxRef("AsyncFunction")}}</p> - </li> - <li><span>Reflection</span> - <p>{{JSxRef("Reflect")}}<br> - {{JSxRef("Proxy")}}</p> - </li> - <li><span>Internationalization</span> - <p>{{JSxRef("Intl")}}<br> - {{JSxRef("Global_Objects/Intl/Collator", "Intl.Collator")}}<br> - {{JSxRef("Global_Objects/Intl/DateTimeFormat", "Intl.DateTimeFormat")}}<br> - {{JSxRef("Global_Objects/Intl/DisplayNames", "Intl.DisplayNames")}}<br> - {{JSxRef("Global_Objects/Intl/ListFormat", "Intl.ListFormat")}}<br> - {{JSxRef("Global_Objects/Intl/Locale", "Intl.Locale")}}<br> - {{JSxRef("Global_Objects/Intl/NumberFormat", "Intl.NumberFormat")}}<br> - {{JSxRef("Global_Objects/Intl/PluralRules", "Intl.PluralRules")}}<br> - {{JSxRef("Global_Objects/Intl/RelativeTimeFormat", "Intl.RelativeTimeFormat")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>WebAssembly</span> - - <p>{{JSxRef("WebAssembly")}}<br> - {{JSxRef("WebAssembly.Module")}}<br> - {{JSxRef("WebAssembly.Instance")}}<br> - {{JSxRef("WebAssembly.Memory")}}<br> - {{JSxRef("WebAssembly.Table")}}<br> - {{JSxRef("WebAssembly.CompileError")}}<br> - {{JSxRef("WebAssembly.LinkError")}}<br> - {{JSxRef("WebAssembly.RuntimeError")}}</p> - </li> -</ul> - -<h2 id="Statements">Statements</h2> - -<p><a href="/en-US/docs/Web/JavaScript/Reference/Statements">JavaScript statements and declarations</a></p> - -<ul class="card-grid"> - <li><span>Control flow</span>{{jsxref("Statements/block", "Block")}}<br> - {{jsxref("Statements/break", "break")}}<br> - {{jsxref("Statements/continue", "continue")}}<br> - {{jsxref("Statements/Empty", "Empty")}}<br> - {{jsxref("Statements/if...else", "if...else")}}<br> - {{jsxref("Statements/switch", "switch")}}<br> - {{jsxref("Statements/throw", "throw")}}<br> - {{jsxref("Statements/try...catch", "try...catch")}}</li> - <li><span>Declarations</span> - <p>{{jsxref("Statements/var", "var")}}<br> - {{jsxref("Statements/let", "let")}}<br> - {{jsxref("Statements/const", "const")}}</p> - </li> - <li><span>Functions and classes</span> - <p>{{jsxref("Statements/function", "function")}}<br> - {{jsxref("Statements/function*", "function*")}}<br> - {{jsxref("Statements/async_function", "async function")}}<br> - {{jsxref("Statements/return", "return")}}<br> - {{jsxref("Statements/class", "class")}}</p> - </li> - <li><span>Iterations</span> - <p>{{jsxref("Statements/do...while", "do...while")}}<br> - {{jsxref("Statements/for", "for")}}<br> - {{jsxref("Statements/for_each...in", "for each...in")}}<br> - {{jsxref("Statements/for...in", "for...in")}}<br> - {{jsxref("Statements/for...of", "for...of")}}<br> - {{jsxref("Statements/for-await...of", "for await...of")}}<br> - {{jsxref("Statements/while", "while")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>Other</span> - - <p>{{jsxref("Statements/debugger", "debugger")}}<br> - {{jsxref("Statements/import", "import")}}<br> - {{jsxref("Statements/label", "label")}}<br> - {{jsxref("Statements/with", "with")}}</p> - </li> -</ul> - -<h2 id="Expressions_and_operators">Expressions and operators</h2> - -<p><a href="/en-US/docs/Web/JavaScript/Reference/Operators">JavaScript expressions and operators</a>. </p> - -<div> -<ul class="card-grid"> - <li><span>Primary expressions</span>{{JSxRef("Operators/this", "this")}}<br> - {{JSxRef("Operators/function", "function")}}<br> - {{JSxRef("Operators/class", "class")}}<br> - {{JSxRef("Operators/function*", "function*")}}<br> - {{JSxRef("Operators/yield", "yield")}}<br> - {{JSxRef("Operators/yield*", "yield*")}}<br> - {{JSxRef("Operators/async_function", "async function")}}<br> - {{JSxRef("Operators/await", "await")}}<br> - {{JSxRef("Global_Objects/Array", "[]")}}<br> - {{JSxRef("Operators/Object_initializer", "{}")}}<br> - {{JSxRef("Global_Objects/RegExp", "/ab+c/i")}}<br> - {{JSxRef("Operators/Grouping", "( )")}}<br> - {{JSxRef("null")}}</li> - <li><span>Left-hand-side expressions</span> - <p>{{JSxRef("Operators/Property_accessors", "Property accessors", "", 1)}}<br> - {{JSxRef("Operators/new", "new")}}<br> - {{JSxRef("Operators/new%2Etarget", "new.target")}}<br> - {{JSxRef("Operators/super", "super")}}<br> - {{JSxRef("Operators/Spread_syntax", "...obj")}}</p> - </li> - <li><span>Increment & decrement</span> - <p>{{JSxRef("Operators/Arithmetic_Operators", "A++", "#Increment")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "A--", "#Decrement")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "++A", "#Increment")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "--A", "#Decrement")}}</p> - </li> - <li><span>Unary operators</span> - <p>{{JSxRef("Operators/delete", "delete")}}<br> - {{JSxRef("Operators/void", "void")}}<br> - {{JSxRef("Operators/typeof", "typeof")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "+", "#Unary_plus")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "-", "#Unary_negation")}}<br> - {{JSxRef("Operators/Bitwise_Operators", "~", "#Bitwise_NOT")}}<br> - {{JSxRef("Operators/Logical_Operators", "!", "#Logical_NOT")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>Arithmetic operators</span> - - <p>{{JSxRef("Operators/Arithmetic_Operators", "+", "#Addition")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "-", "#Subtraction")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "/", "#Division")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "*", "#Multiplication")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "%", "#Remainder")}}<br> - {{JSxRef("Operators/Arithmetic_Operators", "**", "#Exponentiation")}}</p> - </li> - <li><span>Relational operators</span> - <p>{{JSxRef("Operators/in", "in")}}<br> - {{JSxRef("Operators/instanceof", "instanceof")}}<br> - {{JSxRef("Operators/Comparison_Operators", "<", "#Less_than_operator")}}<br> - {{JSxRef("Operators/Comparison_Operators", ">", "#Greater_than_operator")}}<br> - {{JSxRef("Operators/Comparison_Operators", "<=", "#Less_than_or_equal_operator")}}<br> - {{JSxRef("Operators/Comparison_Operators", ">=", "#Greater_than_or_equal_operator")}}</p> - </li> - <li><span>Equality operators</span> - <p>{{JSxRef("Operators/Comparison_Operators", "==", "#Equality")}}<br> - {{JSxRef("Operators/Comparison_Operators", "!=", "#Inequality")}}<br> - {{JSxRef("Operators/Comparison_Operators", "===", "#Identity")}}<br> - {{JSxRef("Operators/Comparison_Operators", "!==", "#Nonidentity")}}</p> - </li> - <li><span>Bitwise shift operators</span> - <p>{{JSxRef("Operators/Bitwise_Operators", "<<", "#Left_shift")}}<br> - {{JSxRef("Operators/Bitwise_Operators", ">>", "#Right_shift")}}<br> - {{JSxRef("Operators/Bitwise_Operators", ">>>", "#Unsigned_right_shift")}}</p> - </li> -</ul> - -<ul class="card-grid"> - <li><span>Binary bitwise operators</span>{{JSxRef("Operators/Bitwise_Operators", "&", "#Bitwise_AND")}}<br> - {{JSxRef("Operators/Bitwise_Operators", "|", "#Bitwise_OR")}}<br> - {{JSxRef("Operators/Bitwise_Operators", "^", "#Bitwise_XOR")}}</li> - <li><span>Binary logical operators</span> - <p>{{JSxRef("Operators/Logical_Operators", "&&", "#Logical_AND")}}<br> - {{JSxRef("Operators/Logical_Operators", "||", "#Logical_OR")}}</p> - </li> - <li><span>Conditional (ternary) operator</span> - <p>{{JSxRef("Operators/Conditional_Operator", "(condition ? ifTrue : ifFalse)")}}</p> - </li> - <li><span>Assignment operators</span> - <p>{{JSxRef("Operators/Assignment_Operators", "=", "#Assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "*=", "#Multiplication_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "/=", "#Division_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "%=", "#Remainder_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "+=", "#Addition_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "-=", "#Subtraction_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "<<=", "#Left_shift_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", ">>=", "#Right_shift_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", ">>>=", "#Unsigned_right_shift_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "&=", "#Bitwise_AND_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "^=", "#Bitwise_XOR_assignment")}}<br> - {{JSxRef("Operators/Assignment_Operators", "|=", "#Bitwise_OR_assignment")}}<br> - {{JSxRef("Operators/Destructuring_assignment", "[a, b] = [1, 2]")}}<br> - {{JSxRef("Operators/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}</p> - </li> -</ul> -</div> - -<h2 id="Functions">Functions</h2> - -<p>This chapter documents how to work with <a href="/en-US/docs/Web/JavaScript/Reference/Functions">JavaScript functions</a> to develop your applications.</p> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments"><code>arguments</code></a></li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Arrow functions</a></li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">Default parameters</a></li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters">Rest parameters</a></li> -</ul> - -<h2 id="Additional_reference_pages">Additional reference pages</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Lexical_grammar">Lexical grammar</a></li> - <li><a href="/en-US/docs/Web/JavaScript/Data_structures">Data types and data structures</a></li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a></li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features">Deprecated features</a></li> -</ul> diff --git a/files/my/web/javascript/reference/statements/function_star_/index.html b/files/my/web/javascript/reference/statements/function_star_/index.html deleted file mode 100644 index 414d5f4d63..0000000000 --- a/files/my/web/javascript/reference/statements/function_star_/index.html +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: function* -slug: Web/JavaScript/Reference/Statements/function* -translation_of: Web/JavaScript/Reference/Statements/function* ---- -<div dir="rtl">{{jsSidebar("Statements")}}</div> - -<p>The <code><strong>function*</strong></code> declaration (<code>function</code> keyword followed by an asterisk) defines a <em>generator function</em>, which returns a {{jsxref("Global_Objects/Generator","Generator")}} object.</p> - -<div>{{EmbedInteractiveExample("pages/js/statement-functionasterisk.html")}}</div> - - - -<p>You can also define generator functions using the {{jsxref("GeneratorFunction")}} constructor, or the function expression syntax.</p> - -<h2 id="Syntax">Syntax</h2> - -<pre class="syntaxbox notranslate">function* <var>name</var>([<var>param</var>[, <var>param</var>[, ... <var>param</var>]]]) { - <var>statements</var> -} -</pre> - -<dl> - <dt><code><var>name</var></code></dt> - <dd>The function name.</dd> - <dt><code><var>param</var></code> {{optional_inline}}</dt> - <dd>The name of a formal parameter for the function.</dd> - <dt><code><var>statements</var></code></dt> - <dd>The statements comprising the body of the function.</dd> -</dl> - -<h2 id="Description">Description</h2> - -<p>Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances.</p> - -<p>Generators in JavaScript -- especially when combined with Promises -- are a very powerful tool for asynchronous programming as they mitigate -- if not entirely eliminate -- the problems with callbacks, such as <a href="http://callbackhell.com/">Callback Hell</a> and <a href="https://frontendmasters.com/courses/rethinking-async-js/callback-problems-inversion-of-control/">Inversion of Control</a>. However, an even simpler solution to these problems can be achieved with {{jsxref("Statements/async_function", "async functions")}}.</p> - -<p>Calling a generator function does not execute its body immediately; an <a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterator">iterator</a> object for the function is returned instead. When the iterator's <code>next()</code> method is called, the generator function's body is executed until the first {{jsxref("Operators/yield", "yield")}} expression, which specifies the value to be returned from the iterator or, with {{jsxref("Operators/yield*", "yield*")}}, delegates to another generator function. The <code>next()</code> method returns an object with a <code>value</code> property containing the yielded value and a <code>done</code> property which indicates whether the generator has yielded its last value, as a boolean. Calling the <code>next()</code> method with an argument will resume the generator function execution, replacing the <code>yield</code> expression where an execution was paused with the argument from <code>next()</code>.</p> - -<p>A <code>return</code> statement in a generator, when executed, will make the generator finish (i.e. the <code>done</code> property of the object returned by it will be set to <code>true</code>). If a value is returned, it will be set as the <code>value</code> property of the object returned by the generator.<br> - Much like a <code>return</code> statement, an error is thrown inside the generator will make the generator finished -- unless caught within the generator's body.<br> - When a generator is finished, subsequent <code>next()</code> calls will not execute any of that generator's code, they will just return an object of this form: <code>{value: undefined, done: true}</code>.</p> - -<h2 id="Examples">Examples</h2> - -<h3 id="Simple_example">Simple example</h3> - -<pre class="brush: js notranslate">function* idMaker() { - var index = 0; - while (true) - yield index++; -} - -var gen = idMaker(); - -console.log(gen.next().value); // 0 -console.log(gen.next().value); // 1 -console.log(gen.next().value); // 2 -console.log(gen.next().value); // 3 -// ...</pre> - -<h3 id="Example_with_yield*">Example with yield*</h3> - -<pre class="brush: js notranslate">function* anotherGenerator(i) { - yield i + 1; - yield i + 2; - yield i + 3; -} - -function* generator(i) { - yield i; - yield* anotherGenerator(i); - yield i + 10; -} - -var gen = generator(10); - -console.log(gen.next().value); // 10 -console.log(gen.next().value); // 11 -console.log(gen.next().value); // 12 -console.log(gen.next().value); // 13 -console.log(gen.next().value); // 20 -</pre> - -<h3 id="Passing_arguments_into_Generators">Passing arguments into Generators</h3> - -<pre class="brush: js notranslate">function* logGenerator() { - console.log(0); - console.log(1, yield); - console.log(2, yield); - console.log(3, yield); -} - -var gen = logGenerator(); - -// the first call of next executes from the start of the function -// until the first yield statement -gen.next(); // 0 -gen.next('pretzel'); // 1 pretzel -gen.next('california'); // 2 california -gen.next('mayonnaise'); // 3 mayonnaise -</pre> - -<h3 id="Return_statement_in_a_generator">Return statement in a generator</h3> - -<pre class="brush: js notranslate">function* yieldAndReturn() { - yield "Y"; - return "R"; - yield "unreachable"; -} - -var gen = yieldAndReturn() -console.log(gen.next()); // { value: "Y", done: false } -console.log(gen.next()); // { value: "R", done: true } -console.log(gen.next()); // { value: undefined, done: true } -</pre> - -<h3 id="Generator_as_an_object_property">Generator as an object property</h3> - -<pre class="brush: js notranslate">const someObj = { - *generator () { - yield 'a'; - yield 'b'; - } -} - -const gen = someObj.generator() - -console.log(gen.next()); // { value: 'a', done: false } -console.log(gen.next()); // { value: 'b', done: false } -console.log(gen.next()); // { value: undefined, done: true } -</pre> - -<h3 id="Generator_as_an_object_method">Generator as an object method</h3> - -<pre class="brush: js notranslate">class Foo { - *generator () { - yield 1; - yield 2; - yield 3; - } -} - -const f = new Foo (); -const gen = f.generator(); - -console.log(gen.next()); // { value: 1, done: false } -console.log(gen.next()); // { value: 2, done: false } -console.log(gen.next()); // { value: 3, done: false } -console.log(gen.next()); // { value: undefined, done: true } -</pre> - -<h3 id="Generator_as_a_computed_property">Generator as a computed property</h3> - -<pre class="brush: js notranslate">class Foo { - *[Symbol.iterator] () { - yield 1; - yield 2; - } -} - -const SomeObj = { - *[Symbol.iterator] () { - yield 'a'; - yield 'b'; - } -} - -console.log(Array.from(new Foo)); // [ 1, 2 ] -console.log(Array.from(SomeObj)); // [ 'a', 'b' ] -</pre> - -<h3 id="Generators_are_not_constructable">Generators are not constructable</h3> - -<pre class="brush: js notranslate">function* f() {} -var obj = new f; // throws "TypeError: f is not a constructor -</pre> - -<h3 id="Generator_defined_in_an_expression">Generator defined in an expression</h3> - -<pre class="brush: js notranslate">const foo = function* () { - yield 10; - yield 20; -}; - -const bar = foo(); -console.log(bar.next()); // {value: 10, done: false}</pre> - -<h3 id="Generator_example">Generator example</h3> - -<pre class="syntaxbox notranslate">function* powers(n){ - //endless loop to generate - for(let current =n;; current *= n){ - yield current; - } -} - -for(let power of powers(2)){ - //controlling generator - if(power > 32) break; - console.log(power) - //2 - //4 - //8 - //16 - //32 -}</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('ESDraft', '#sec-generator-function-definitions', 'function*')}}</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<div> - - -<p>{{Compat("javascript.statements.generator_function")}}</p> -</div> - -<h2 id="See_also">See also</h2> - -<ul> - <li>{{jsxref("Operators/function*", "function* expression")}}</li> - <li>{{jsxref("GeneratorFunction")}} object</li> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">Iteration protocols</a></li> - <li>{{jsxref("Operators/yield", "yield")}}</li> - <li>{{jsxref("Operators/yield*", "yield*")}}</li> - <li>{{jsxref("Function")}} object</li> - <li>{{jsxref("Statements/function", "function declaration")}}</li> - <li>{{jsxref("Operators/function", "function expression")}}</li> - <li>{{jsxref("Functions_and_function_scope", "Functions and function scope")}}</li> - <li>Other web resources: - <ul> - <li><a href="http://facebook.github.io/regenerator/">Regenerator</a> an ES2015 generator compiler to ES5</li> - <li><a href="http://www.youtube.com/watch?v=qbKWsbJ76-s">Forbes Lindesay: Promises and Generators: control flow utopia -- JSConf EU 2013</a></li> - <li><a href="https://github.com/mozilla/task.js">Task.js</a></li> - <li><a href="https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async%20%26%20performance/ch4.md#iterating-generators-asynchronously">Iterating generators asynchronously</a></li> - </ul> - </li> -</ul> diff --git a/files/my/web/javascript/reference/statements/index.html b/files/my/web/javascript/reference/statements/index.html deleted file mode 100644 index b5f4f3d5e0..0000000000 --- a/files/my/web/javascript/reference/statements/index.html +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Statements and declarations -slug: Web/JavaScript/Reference/Statements -tags: - - JavaScript - - Landing page - - NeedsTranslation - - Reference - - TopicStub - - statements -translation_of: Web/JavaScript/Reference/Statements ---- -<div>{{jsSidebar("Statements")}}</div> - -<p>JavaScript applications consist of statements with an appropriate syntax. A single statement may span multiple lines. Multiple statements may occur on a single line if each statement is separated by a semicolon. This isn't a keyword, but a group of keywords.</p> - -<h2 id="Statements_and_declarations_by_category">Statements and declarations by category</h2> - -<p>For an alphabetical listing see the sidebar on the left.</p> - -<h3 id="Control_flow">Control flow</h3> - -<dl> - <dt>{{jsxref("Statements/block", "Block")}}</dt> - <dd>A block statement is used to group zero or more statements. The block is delimited by a pair of curly brackets.</dd> - <dt>{{jsxref("Statements/break", "break")}}</dt> - <dd>Terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.</dd> - <dt>{{jsxref("Statements/continue", "continue")}}</dt> - <dd>Terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.</dd> - <dt>{{jsxref("Statements/Empty", "Empty")}}</dt> - <dd>An empty statement is used to provide no statement, although the JavaScript syntax would expect one.</dd> - <dt>{{jsxref("Statements/if...else", "if...else")}}</dt> - <dd>Executes a statement if a specified condition is true. If the condition is false, another statement can be executed.</dd> - <dt>{{jsxref("Statements/switch", "switch")}}</dt> - <dd>Evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case.</dd> - <dt>{{jsxref("Statements/throw", "throw")}}</dt> - <dd>Throws a user-defined exception.</dd> - <dt>{{jsxref("Statements/try...catch", "try...catch")}}</dt> - <dd>Marks a block of statements to try, and specifies a response, should an exception be thrown.</dd> -</dl> - -<h3 id="Declarations">Declarations</h3> - -<dl> - <dt>{{jsxref("Statements/var", "var")}}</dt> - <dd>Declares a variable, optionally initializing it to a value.</dd> - <dt>{{jsxref("Statements/let", "let")}}</dt> - <dd>Declares a block scope local variable, optionally initializing it to a value.</dd> - <dt>{{jsxref("Statements/const", "const")}}</dt> - <dd>Declares a read-only named constant.</dd> -</dl> - -<h3 id="Functions_and_classes">Functions and classes</h3> - -<dl> - <dt>{{jsxref("Statements/function", "function")}}</dt> - <dd>Declares a function with the specified parameters.</dd> - <dt>{{jsxref("Statements/function*", "function*")}}</dt> - <dd>Generator Functions enable writing <a href="/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol">iterators</a> more easily.</dd> - <dt>{{jsxref("Statements/async_function", "async function")}}</dt> - <dd>Declares an async function with the specified parameters.</dd> - <dt>{{jsxref("Statements/return", "return")}}</dt> - <dd>Specifies the value to be returned by a function.</dd> - <dt>{{jsxref("Statements/class", "class")}}</dt> - <dd>Declares a class.</dd> -</dl> - -<h3 id="Iterations">Iterations</h3> - -<dl> - <dt>{{jsxref("Statements/do...while", "do...while")}}</dt> - <dd>Creates a loop that executes a specified statement until the test condition evaluates to false. The condition is evaluated after executing the statement, resulting in the specified statement executing at least once.</dd> - <dt>{{jsxref("Statements/for", "for")}}</dt> - <dd>Creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement executed in the loop.</dd> - <dt>{{jsxref("Statements/for_each...in", "for each...in")}} </dt> - <dd>Iterates a specified variable over all values of object's properties. For each distinct property, a specified statement is executed.</dd> - <dt>{{jsxref("Statements/for...in", "for...in")}}</dt> - <dd>Iterates over the enumerable properties of an object, in arbitrary order. For each distinct property, statements can be executed.</dd> - <dt>{{jsxref("Statements/for...of", "for...of")}}</dt> - <dd>Iterates over iterable objects (including {{jsxref("Global_Objects/Array","arrays","","true")}}, array-like objects, <a href="/en-US/docs/JavaScript/Guide/Iterators_and_Generators">iterators and generators</a>), invoking a custom iteration hook with statements to be executed for the value of each distinct property.</dd> - <dt>{{jsxref("Statements/for-await...of", "for await...of")}}</dt> - <dd>Iterates over async iterable objects, array-like objects, <a href="/en-US/docs/JavaScript/Guide/Iterators_and_Generators">iterators and generators</a>, invoking a custom iteration hook with statements to be executed for the value of each distinct property.</dd> - <dt>{{jsxref("Statements/while", "while")}}</dt> - <dd>Creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.</dd> -</dl> - -<h3 id="Others">Others</h3> - -<dl> - <dt>{{jsxref("Statements/debugger", "debugger")}}</dt> - <dd>Invokes any available debugging functionality. If no debugging functionality is available, this statement has no effect.</dd> - <dt>{{jsxref("Statements/export", "export")}}</dt> - <dd>Used to export functions to make them available for imports in external modules, and other scripts.</dd> - <dt>{{jsxref("Statements/import", "import")}}</dt> - <dd>Used to import functions exported from an external module, another script.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/Reference/Statements/import.meta"><code>import.meta</code></a></dt> - <dd>An object exposing context-specific metadata to a JavaScript module.</dd> - <dt>{{jsxref("Statements/label", "label")}}</dt> - <dd>Provides a statement with an identifier that you can refer to using a <code>break</code> or <code>continue</code> statement.</dd> -</dl> - -<dl> - <dt>{{jsxref("Statements/with", "with")}} </dt> - <dd>Extends the scope chain for a statement.</dd> -</dl> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-ecmascript-language-statements-and-declarations', 'ECMAScript Language: Statements and Declarations')}}</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("javascript.statements")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators">Operators</a></li> -</ul> |