From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/my/web/css/@font-face/index.html | 196 +++++++++++++ files/my/web/css/css_transitions/index.html | 59 ++++ files/my/web/css/index.html | 110 ++++++++ files/my/web/guide/index.html | 67 +++++ .../connection_management_in_http_1.x/index.html | 86 ++++++ files/my/web/http/index.html | 90 ++++++ files/my/web/index.html | 90 ++++++ files/my/web/javascript/index.html | 104 +++++++ files/my/web/javascript/reference/index.html | 312 +++++++++++++++++++++ .../reference/statements/function_star_/index.html | 252 +++++++++++++++++ .../web/javascript/reference/statements/index.html | 130 +++++++++ 11 files changed, 1496 insertions(+) create mode 100644 files/my/web/css/@font-face/index.html create mode 100644 files/my/web/css/css_transitions/index.html create mode 100644 files/my/web/css/index.html create mode 100644 files/my/web/guide/index.html create mode 100644 files/my/web/http/connection_management_in_http_1.x/index.html create mode 100644 files/my/web/http/index.html create mode 100644 files/my/web/index.html create mode 100644 files/my/web/javascript/index.html create mode 100644 files/my/web/javascript/reference/index.html create mode 100644 files/my/web/javascript/reference/statements/function_star_/index.html create mode 100644 files/my/web/javascript/reference/statements/index.html (limited to 'files/my/web') diff --git a/files/my/web/css/@font-face/index.html b/files/my/web/css/@font-face/index.html new file mode 100644 index 0000000000..69a0d3d8c9 --- /dev/null +++ b/files/my/web/css/@font-face/index.html @@ -0,0 +1,196 @@ +--- +title: '@font-face' +slug: Web/CSS/@font-face +translation_of: Web/CSS/@font-face +--- +
{{CSSRef}}
+ +

The @font-face CSS at-rule 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.

+ +

Syntax

+ +
@font-face {
+  font-family: "Open Sans";
+  src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
+       url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
+}
+ +

Descriptors

+ +
+
{{cssxref("@font-face/font-display", "font-display")}}
+
Determines how a font face is displayed based on whether and when it is downloaded and ready to use.
+
{{cssxref("@font-face/font-family", "font-family")}}
+
Specifies a name that will be used as the font face value for font properties.
+
{{cssxref("@font-face/font-stretch", "font-stretch")}}
+
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 font-stretch: 50% 200%;
+
{{cssxref("@font-face/font-style", "font-style")}}
+
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 font-style: oblique 20deg 50deg;
+
{{cssxref("@font-face/font-weight", "font-weight")}}
+
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 font-weight: 100 400;
+
{{cssxref("@font-face/font-variant", "font-variant")}}
+
A {{cssxref("font-variant")}} value.
+
{{cssxref("font-feature-settings", "font-feature-settings")}}
+
Allows control over advanced typographic features in OpenType fonts.
+
{{cssxref("@font-face/font-variation-settings", "font-variation-settings")}}
+
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.
+
{{cssxref("@font-face/src", "src")}}
+
+

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.

+ +

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 format() function:

+ +
src: url(ideal-sans-serif.woff) format("woff"),
+     url(basic-sans-serif.ttf) format("truetype");
+ +

The available types are: "woff", "woff2", "truetype", "opentype", "embedded-opentype", and "svg".

+
+
{{cssxref("@font-face/unicode-range", "unicode-range")}}
+
The range of Unicode code points to be used from the font.
+
+ +

Description

+ +

If the local() 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 url() function is downloaded and used.

+ +

By allowing authors to provide their own fonts, @font-face 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.

+ +

It's common to use both url() and local() 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.

+ +

The @font-face at-rule may be used not only at the top level of a CSS, but also inside any CSS conditional-group at-rule.

+ +

Font MIME Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FormatMIME type
TrueTypefont/ttf
OpenTypefont/otf
Web Open Font Formatfont/woff
Web Open Font Format 2font/woff2
+ +

Notes

+ + + +

Formal syntax

+ +
{{csssyntax}}
+ +

Examples

+ +

Specifying a downloadable font

+ +

This example simply specifies a downloadable font to use, applying it to the entire body of the document:

+ +

View the live example

+ +
<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>
+
+ +

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:

+ +
@font-face {
+  font-family: MyHelvetica;
+  src: local("Helvetica Neue Bold"),
+       local("HelveticaNeue-Bold"),
+       url(MgOpenModernaBold.ttf);
+  font-weight: bold;
+}
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WOFF2.0', '', 'WOFF2 font format')}}{{Spec2('WOFF2.0')}}Font format specification with new compression algorithm
{{SpecName('WOFF1.0', '', 'WOFF font format')}}{{Spec2('WOFF1.0')}}Font format specification
{{SpecName('CSS3 Fonts', '#font-face-rule', '@font-face')}}{{Spec2('CSS3 Fonts')}}Initial definition
+ +

Browser compatibility

+ + + +

{{Compat("css.at-rules.font-face")}}

+ +

See also

+ + diff --git a/files/my/web/css/css_transitions/index.html b/files/my/web/css/css_transitions/index.html new file mode 100644 index 0000000000..6f134a503b --- /dev/null +++ b/files/my/web/css/css_transitions/index.html @@ -0,0 +1,59 @@ +--- +title: CSS Transitions +slug: Web/CSS/CSS_Transitions +tags: + - CSS + - CSS Transitions + - Overview + - Reference +translation_of: Web/CSS/CSS_Transitions +--- +

{{CSSRef}}

+ +

အသွင်ကူးပြောင်းမှု CSS ကိုကိုကို နျသနျသရငျညြတိကျတဲ့ဂုဏ်သတ္တိများ၏ CSS ကိုတန်ဖိုးများမွားထဲတွင်အကိုကိုကှားတဖြည်းဖြည်းအသွင်ကူးပြောင်းမှု ဖန်တီးပေးနိုင်ပါတယ်ဒါကတော့ CSS ကိုကိုတစ် module တစ်ခုတစ်ခုဖြစ်ပါတယ်။ အဲဒီအသွင်ကူးပြောင်းမှုများ၏အပြုအမူသူတို့ရဲ့ function ကိုကိုအချိန်ကိုက်, ကြာချိန်နှင့်အခြား attribute ကိုတွေသတ်မှတ်ခြင်းကထိန်းချုပ်ထားနိုင်ပါတယ်။

+ +

အညွှန်း

+ +

ဂုဏ်သတ္တိများကို

+ +
+ +
+ +

လမ်းညွှန်များ

+ +
+
CSS ကိုကိုအကူးအပြောင်းကိုအသုံးပြုခြင်း
+
Step-by-step CSS ကိုကိုသုံးပြီးအသွင်ကူးပြောင်းမှုကိုဖန်တီးရန်ဘယ်လိုသင်ခန်းစာ။ ဆောင်းပါးသည်တစြဤဦးချင်းစီကိုကို သက်ဆိုင်ရာ CSS ကိုပိုင်ဆိုင်မှုဖော်ပြထားသည်မွားကိုကိုနှငျ့သူတို့ကတစြ ဦးချင်းစီကတခြားတွေနဲ့အပြန်အလှန်ဘယ်လိုရှင်းပြ ။
+
+ +

အသေးစိတ်ဖော်ပြချက်

+ + + + + + + + + + + + + + + + +
သတ်မှတ်ချက်အဆင့်အတန်းမှတ်ချက်
{{SpecName('CSS3 Transitions')}}{{Spec2('CSS3 Transitions')}}ကနဦးချက်နှင့်အဓိပ္ပါယ်။
+ +

ကိုလည်းကြည့်ပါ

+ + diff --git a/files/my/web/css/index.html b/files/my/web/css/index.html new file mode 100644 index 0000000000..eb5e30fc56 --- /dev/null +++ b/files/my/web/css/index.html @@ -0,0 +1,110 @@ +--- +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 +--- +
{{CSSRef}}
+ +

Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML (including XML dialects such as SVG, MathML or {{Glossary("XHTML", "", 1)}}). CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.

+ +

CSS is one of the core languages of the open Web and is standardized across Web browsers according to the W3C specification. Developed in levels, CSS1 is now obsolete, CSS2.1 is a recommendation, and CSS3, now split into smaller modules, is progressing on the standardization track.

+ +
+ + +
+
+

Tutorials

+ +

Our CSS Learning Area features multiple modules that teach CSS from the ground up — no previous knowledge required.

+ +
+
Introduction to CSS
+
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.
+
Styling text
+
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.
+
Styling boxes
+
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.
+
CSS layout
+
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.
+
+
+ +
+

Reference

+ + + +

Cookbook

+ +

The CSS layout cookbook 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.

+ +

Tools for CSS development

+ + + +

Meta bugs

+ +
    +
  • Firefox: {{bug(1323667)}}
  • +
+
+
+
+ +

See also

+ + diff --git a/files/my/web/guide/index.html b/files/my/web/guide/index.html new file mode 100644 index 0000000000..56e0fa9e82 --- /dev/null +++ b/files/my/web/guide/index.html @@ -0,0 +1,67 @@ +--- +title: Web developer guide +slug: Web/Guide +tags: + - Guide + - Landing + - NeedsTranslation + - TopicStub + - Web +translation_of: Web/Guide +--- +

These articles provide how-to information to help you make use of specific technologies and APIs.

+ +
+
+
+
+
+
CSS developer guide
+
Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML
+
Event developer guide
+
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.
+
Graphics on the Web
+
Modern Web sites and applications often need to present graphics.
+
Guide to Web APIs
+
List all Web APIs and what they are doing
+
HTML developer guide
+
HyperText Markup Language (HTML) is the core language of nearly all Web content. Most of what you see on screen in your browser is described, fundamentally, using HTML.
+
JavaScript
+
JavaScript is the powerful scripting language used to create applications for the Web.
+
Localizations and character encodings
+
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 HTML specification recommends 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.
+
Mobile Web Development
+
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 Firefox OS page. Or you might be interested in details about Firefox for Android.
+
+ +
+
+
+ +
+
+
Optimization and performance
+
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.
+
Parsing and serializing XML
+
The Web platform provides the following objects for parsing and serializing XML:
+
SVG-in-OpenType
+
The SVG-in-OpenType work is currently in the hands of the MPEG group. Once we're ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded.
+
The Web Open Font Format (WOFF)
+
WOFF (the Web Open Font Format) is a  web font format developed by Mozilla in concert with Type Supply, LettError, and other organizations. It
+
User experience
+
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.
+
Using FormData Objects
+
The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. 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 submit() method would use to send the data if the form's encoding type were set to "multipart/form-data".
+
Glossary
+
Defines numerous technical terms related to the Web and Internet.
+
+
+
+
+
+ +

See also

+ + 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 new file mode 100644 index 0000000000..201f93a64c --- /dev/null +++ b/files/my/web/http/connection_management_in_http_1.x/index.html @@ -0,0 +1,86 @@ +--- +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 +--- +
{{HTTPSidebar}}
+ +

การจัดการการเชื่อมต่อเป็นหัวข้อสำคัญใน HTTP: การเปิดและรักษาการเชื่อมต่อส่วนใหญ่มีผลต่อประสิทธิภาพของเว็บไซต์และแอปพลิเคชันเว็บ ใน HTTP / 1.x มีหลายโมเดล: การเชื่อมต่อสั้น ๆ , การเชื่อมต่อแบบถาวรและHTTP pipelining

+ +

HTTP ส่วนใหญ่อาศัย TCP สำหรับโปรโตคอลการขนส่งโดยให้การเชื่อมต่อระหว่างไคลเอนต์และเซิร์ฟเวอร์ ในวัยเด็ก HTTP ใช้แบบจำลองเดียวเพื่อจัดการการเชื่อมต่อดังกล่าว การเชื่อมต่อเหล่านี้มีอายุการใช้งานสั้น: การเชื่อมต่อใหม่ที่สร้างขึ้นทุกครั้งที่จำเป็นต้องส่งคำขอและจะปิดเมื่อได้รับคำตอบ

+ +

โมเดลที่เรียบง่ายนี้มีข้อ จำกัด ด้านประสิทธิภาพโดยธรรมชาติ: การเปิดการเชื่อมต่อ TCP แต่ละครั้งเป็นการดำเนินการที่ใช้ทรัพยากรมาก ต้องแลกเปลี่ยนข้อความหลายข้อความระหว่างไคลเอนต์และเซิร์ฟเวอร์ เวลาในการตอบสนองของเครือข่ายและแบนด์วิดท์มีผลต่อประสิทธิภาพเมื่อคำขอต้องการส่ง หน้าเว็บสมัยใหม่ต้องการคำขอจำนวนมาก (ตั้งแต่หนึ่งโหลขึ้นไป) เพื่อให้บริการข้อมูลตามจำนวนที่ต้องการซึ่งพิสูจน์ได้ว่ารุ่นก่อนหน้านี้ไม่มีประสิทธิภาพ

+ +

รุ่นใหม่กว่าสองรุ่นถูกสร้างขึ้นใน HTTP / 1.1 โมเดลการเชื่อมต่อแบบต่อเนื่องช่วยให้การเชื่อมต่อเปิดระหว่างคำขอที่ต่อเนื่องลดเวลาที่ต้องใช้ในการเปิดการเชื่อมต่อใหม่ รูปแบบการไปป์ไลน์ HTTP ก้าวไปอีกขั้นด้วยการส่งคำขอต่อเนื่องหลายรายการโดยไม่ต้องรอคำตอบช่วยลดเวลาแฝงในเครือข่ายได้มาก

+ +

Compares the performance of the three HTTP/1.x connection models: short-lived connections, persistent connections, and HTTP pipelining.

+ +
+

HTTP / 2 เพิ่มโมเดลเพิ่มเติมสำหรับการจัดการการเชื่อมต่อ

+
+ +

It's important point to note that connection management in HTTP applies to the connection between two consecutive nodes, which is hop-by-hop and not end-to-end. 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 hop-by-hop headers with their values able to be changed by intermediary nodes.

+ +

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 protocol upgrade mechanism is documented in more detail elsewhere.

+ +

Short-lived connections

+ +

The original model of HTTP, and the default one in HTTP/1.0, is short-lived connections. Each HTTP request is completed on its own connection; this means a TCP handshake happens before each HTTP request, and these are serialized.

+ +

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.

+ +

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 close). In HTTP/1.1, this model is only used when the {{HTTPHeader("Connection")}} header is sent with a value of close.

+ +
+

Unless dealing with a very old system, which doesn't support a persistent connection, there is no compelling reason to use this model.

+
+ +

Persistent connections

+ +

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 persistent connection has been designed, even prior to HTTP/1.1. Alternatively this may be called a keep-alive connection.

+ +

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).

+ +

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.

+ +

HTTP/1.0 connections are not persistent by default. Setting {{HTTPHeader("Connection")}} to anything other than close, usually retry-after, will make them persistent.

+ +

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).

+ +

HTTP pipelining

+ +
+

HTTP pipelining is not activated by default in modern browsers:

+ + + +

For these reasons, pipelining has been superseded by a better algorithm, multiplexing, that is used by HTTP/2.

+
+ +

By default, HTTP 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 seen by the server.

+ +

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 MSS (Maximum Segment Size), is big enough to contain several simple requests, although the demand in size of HTTP requests continues to grow.

+ +

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.

+ +

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.

+ +

Domain sharding

+ +
+

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 connection coalescing to revert eventual domain sharding.

+
+ +

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 DoS protection on the server side if attempting more than this number.

+ +

หากเซิร์ฟเวอร์ต้องการให้เว็บไซต์หรือแอปพลิเคชันตอบสนองเร็วขึ้นเซิร์ฟเวอร์อาจบังคับให้เปิดการเชื่อมต่อเพิ่มเติม ตัวอย่างเช่นแทนที่จะมีทรัพยากรทั้งหมดในโดเมนเดียวกันพูดก็อาจแบ่งมากกว่าหลายโดเมน,www.example.com , , แต่ละโดเมนเหล่านี้แก้ไขไปยังเซิร์ฟเวอร์เดียวกันและเว็บเบราว์เซอร์จะเปิดการเชื่อมต่อ 6 รายการให้กับแต่ละโดเมน(ในตัวอย่างของเราเพิ่มการเชื่อมต่อเป็น 18) เทคนิคนี้เรียกว่าsharding โดเมนwww1.example.comwww2.example.comwww3.example.com

+ +

+ +

สรุป

+ +

การจัดการการเชื่อมต่อที่ได้รับการปรับปรุงช่วยเพิ่มประสิทธิภาพใน HTTP ได้มาก ด้วย HTTP / 1.1 หรือ HTTP / 1.0 การใช้การเชื่อมต่อแบบต่อเนื่องอย่างน้อยก็จนกว่าจะไม่มีการใช้งานจะนำไปสู่ประสิทธิภาพที่ดีที่สุด อย่างไรก็ตามความล้มเหลวของการวางท่อนำไปสู่การออกแบบรูปแบบการจัดการการเชื่อมต่อที่เหนือกว่าซึ่งรวมอยู่ใน HTTP / 2

diff --git a/files/my/web/http/index.html b/files/my/web/http/index.html new file mode 100644 index 0000000000..6e893c3ced --- /dev/null +++ b/files/my/web/http/index.html @@ -0,0 +1,90 @@ +--- +title: HTTP +slug: Web/HTTP +tags: + - HTTP + - Hypertext + - NeedsTranslation + - Reference + - TCP/IP + - TopicStub + - Web + - Web Development + - 'l10n:priority' +translation_of: Web/HTTP +--- +
{{HTTPSidebar}}
+ +

Hypertext Transfer Protocol (HTTP) is an application-layer 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 client-server model, with a client opening a connection to make a request, then waiting until it receives a response. HTTP is a stateless protocol, 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 transport layer, that is, a protocol that doesn't lose messages silently like UDP does. RUDP — the reliable update of UDP — is a suitable alternative.

+ +
+
+

Tutorials

+ +

Learn how to use HTTP with guides and tutorials.

+ +
+
Overview of HTTP
+
The basic features of the client-server protocol: what it can do and its intended uses.
+
HTTP Cache
+
Caching is very important for fast Web sites. This article describes different methods of caching and how to use HTTP Headers to control them.
+
HTTP Cookies
+
How cookies work is defined by RFC 6265. When serving an HTTP request, a server can send a Set-Cookie 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 Cookie request header. The cookie can also be set to expire on a certain date, or restricted to a specific domain and path.
+
Cross-Origin Resource Sharing (CORS)
+
Cross-site HTTP requests are HTTP requests for resources from a different domain than the domain of the resource making the request. For instance, an HTML page from Domain A (http://domaina.example/) makes a request for an image on Domain B (http://domainb.foo/image.jpg) via the img 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.
+
+ +
+
Evolution of HTTP
+
A brief description of the changes between the early versions of HTTP, to the modern HTTP/2, the emergent HTTP/3 and beyond.
+
Mozilla web security guidelines
+
A collection of tips to help operational teams with creating secure web applications.
+
+ +
+
HTTP Messages
+
Describes the type and structure of the different kind of messages of HTTP/1.x and HTTP/2.
+
A typical HTTP session
+
Shows and explains the flow of a usual HTTP session.
+
Connection management in HTTP/1.x
+
Describes the three connection management models available in HTTP/1.x, their strengths, and their weaknesses.
+
+
+ +
+

Reference

+ +

Browse through detailed HTTP reference documentation.

+ +
+
HTTP Headers
+
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 X- prefix; others in an IANA registry, whose original content was defined in RFC 4229. IANA also maintains a registry of proposed new HTTP message headers.
+
HTTP Request Methods
+
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")}}.
+
HTTP Status Response Codes
+
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.
+
+ +
+
CSP directives
+
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.
+
+ +

Tools & resources

+ +

Helpful tools and resources for understanding and debugging HTTP.

+ +
+
Firefox Developer Tools
+
Network monitor
+
Mozilla Observatory
+
+

A project designed to help developers, system administrators, and security professionals configure their sites safely and securely.

+
+
RedBot
+
Tools to check your cache-related headers
+
How Browsers Work
+
A very comprehensive article on browser internals and request flow through HTTP protocol. A MUST-READ for any web developer.
+
+
+
diff --git a/files/my/web/index.html b/files/my/web/index.html new file mode 100644 index 0000000000..3b55338e60 --- /dev/null +++ b/files/my/web/index.html @@ -0,0 +1,90 @@ +--- +title: Web developers နင့္ နည္းပညာ မျာ +slug: Web +tags: + - Landing + - NeedsTranslation + - TopicStub + - Web +translation_of: Web +--- +

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.

+ +

 

+ +

လွတ်လပ်စ

+ +

 

+ +

 

+ +
+
+

Web နည်းပညာများ

+ +

အခြေခံ

+ +
+
HTML
+
၀ဘ်စာမျက်နာတစ်ခုတွင် ပါ၀င်သောအကြောင်းအရာများအား စနစ်ကျတဲ့ ဖွဲ့စည်းပုံ ကို သက်မတ်ရန် အသုံးပြုသောနည်းပညာ တစ်ခုဖြစ်ပါသည။
+
CSS
+
 ၀ဘ်စာမျက်နာပါအကြောင်းအရာများရဲ့  အသွင်အပြင်ကို ဖော်ပြဖို့အတွက်သုံးသည်။
+
+ +

Scripting

+ +
+
JavaScript
+
JavaScript is the programming language that runs in the browser, which is used to build advanced user interactive Web sites and applications.
+
Web APIs
+
Reference material for each of the individual APIs that comprise the Web's powerful scriptability, including the DOM and all of the related APIs and interfaces you can use to build Web content and apps. + +
+
+ +

Graphics

+ +
+
SVG
+
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.
+
WebGL
+
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.
+
+ +

Other

+ +
+
MathML
+
The Mathematical Markup Language makes it possible to display complex mathematical equations and syntax.
+
+
+ +
+

Documentation by type

+ +
+
Web Developer Guide
+
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.
+
Tutorials for Web developers
+
A list of tutorials to take you step-by-step through learning APIs, technologies, or broad topic areas.
+
References
+
This page will offer links to all reference information on MDN, but for now use one of the technology links in the left section.
+
+ +

Other topics

+ +
+
Developing Web applications
+
Documentation for Web application developers; Web apps are true write-once, deploy anywhere apps for mobile, desktop, and Firefox OS.
+
Accessibility
+
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.
+
Security
+
Ensuring that your Web site or open Web app is secure is critical.
+
+
+
+ +

View All...

diff --git a/files/my/web/javascript/index.html b/files/my/web/javascript/index.html new file mode 100644 index 0000000000..d26ea34fb6 --- /dev/null +++ b/files/my/web/javascript/index.html @@ -0,0 +1,104 @@ +--- +title: JavaScript +slug: Web/JavaScript +tags: + - JavaScript + - Landing + - NeedsTranslation + - TopicStub +translation_of: Web/JavaScript +--- +
{{JsSidebar}}
+ +

JavaScript® (အတိုကောက် JS) ဆိုတာ   first-class functions  နှင့်တည်ဆောက်ထား တဲ့a  lightweight, interpreted, object-oriented language တစ်ခုဖြစ်ပါတယ်။အများက သိတာကတော့ web pages တွေအတွက် browser ကိုအခြေ ခံထားတဲ့ scripting language တစ်ခုအနေနဲ့သိကြတယ် ဒါပေမဲ့ browser ကိုအခြေခံ မထားတဲ့ နေရာ တွေဖြစ်တဲ့  node.js ဒါမှမဟုတ်  Apache CouchDB တွေမှာလဲအသုံးပြု ပါတယ်. Javascript ဟာ  prototype-based, multi-paradigm scripting language ဖြစ်ပါတယ်၊ ဆိုလိုတာက dynamic ဖြစ်သလို object-oriented, imperative, and functional programming ရေးသားနည်းပုံစံနဲ့လည်း ထောက်ပံပေးပါတယ်။ အသေးစိတ်ကိုတော့ JavaScript အကြောင်း ပိုမို ဖတ်ရှုကြည့်ပါ။

+ +

JavaScript စံသတ်မှတ်ချက်ကို ECMAScript လို့ခေါ်ပါတယ်။ ၂၀၁၂ မှာ modern browsers တွေအကုန်လုံးက ECMAScript 5.1 ကို အပြည့်အဝ support ပေးနေပါပြီ။ Browsers အဟောင်းတွေက အနည်းဆုံး ECMAScript 3 ကို support ပေးပါတယ်။ ဇွန်လ ၁၇ ရက် ၂၀၁၅ မှာ ခြောက်ကြိမ်မြောက် ECMAScript ကို ကြေငြာပြဌာန်းလိုက်ပါတယ်။ အဲ့ဒီ့ version ကို ECMAScript 2015 လို့တရားဝင်ခေါ်ပါတယ်၊ ဒါပေမယ့်လည်း ECMAScript 6 ဒါမှမဟုတ် ES6 ဆိုပြီးလည်းခေါ်ပါတယ်။

+ +

 ဒီဝက်စာမျက်နှာမှာတော့ JavaScript အကြောင်းကိုပဲ ပြောပြသွားမှာဖြစ်ပါတယ်။Web Pages နဲ့ ဆက်စပ်ပြီးသုံးတဲ့ ဒါမှမဟုတ် တစ်ခြားသော Host Environment နဲ့ စပ်ဆက်ပြီးသုံးတဲ့ အကြောင်းကို ပြောမှ မဟုတ်ပါဘူး။. Web pages နဲ့  စပ်ဆက်ပြီး အသုံးပြုတဲ့ {{Glossary("API","APIs")}}  ကို လေ့လာချင်တဲ့ဆိုရင်တော့ Web APIs နဲ့  DOM မှာ သွားရောက် လေ့လာလို့ရပါတယ်။

+ +

JavaScript ကို Java programming language နဲ့ မတူဘူးဆိုတာ သိထားဖို့လိုပါမယ်။ Java ဆိုတာ U.S. နဲ့ အခြားသောနိုင်ငံတွေမှာ Oracle က မူပိုင်တင်ထားပါတယ်။

+ +
+
+

နည်းပြသင်ခန်းစာများ

+ +

ကျွန်တော်တို့ရဲ့ နည်းပြသင်ခန်းစာများနဲ့ လေ့ကျင့်ခန်းများမှတစ်ဆင့် JavaScript နဲ့ဘယ်လို program လုပ်မလဲဆိုတာလေ့လာပါ။

+ +

နိဒါန်း

+ +
+
JavaScript လမ်းညွှန်
+
သင်က JavaScript ကိုအခုမှစတင်လေ့လာမယ့်သူဆိုရင် ဒီလမ်းညွှန်ကသင့်ကိုအထောက်အကူပြုပါလိမ့်မယ်။ 
+
+
JavaScript နည်းပညာချုံငုံသုံးသပ်ချက်
+
Web browser နဲ့ JavaScript landscape မိတ်ဆက်။
+
Object Oriented JavaScript မိတ်ဆက်
+
Introduction to the concepts of object oriented programming in JavaScript.
+
+ +

Intermediate

+ +
+
A re-introduction to JavaScript
+
An overview for those who think they know about JavaScript.
+
+ +
+
JavaScript data structures
+
Overview of available data structures in JavaScript.
+
Equality comparisons and sameness
+
JavaScript provides three different value-comparison operations: strict equality using ===, loose equality using ==, and the {{jsxref("Global_Objects/Object/is", "Object.is()")}} method.
+
+ +

Advanced

+ +
+
Inheritance and the prototype chain
+
Explanation of the widely misunderstood and under-estimated prototype-based inheritance.
+
Strict mode
+
A restricted variant of JavaScript.
+
JavaScript typed arrays
+
JavaScript typed arrays provide a mechanism for accessing raw binary data.
+
Memory Management
+
Memory life cycle and garbage collection in JavaScript.
+
+
+ +
+

အညွှန်း

+ +

Browse the complete JavaScript reference documentation. 

+ +
+
Standard objects
+
Get to know standard built-in objects Array, Boolean, Date, Error, Function, JSON, Math, Number, Object, RegExp, StringMap, Set, WeakMap, WeakSet, and others.
+
Expressions and operators
+
Learn more about the behavior of JavaScript's operators instanceof, typeof, new, this, the operator precedence, and more.
+
Statements and declarations
+
Learn how do-while, for-in, for-of, try-catch, let, var, const, if-else, switch, and more JavaScript statements and keywords work.
+
Functions
+
Learn how to work with JavaS functions to develop your applications.
+
+ +

Tools & resources

+ +

Helpful tools while writing and debugging your JavaScript code.

+ +
+
Firefox Developer Tools
+
Scratchpad, Web Console, JavaScript Profiler, Debugger, and more.
+
Firebug
+
Edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
+
JavaScript Shells
+
A JavaScript shell allows you to quickly test snippets of JavaScript code.
+
TogetherJS
+
+

Collaboration made easy.

+
+
Stack Overflow
+
Stack Overflow questions tagged with "JavaScript".
+
JavaScript versions and release notes
+
Browse JavaScript's feature history and implementation status.
+
+
+
diff --git a/files/my/web/javascript/reference/index.html b/files/my/web/javascript/reference/index.html new file mode 100644 index 0000000000..1345585f85 --- /dev/null +++ b/files/my/web/javascript/reference/index.html @@ -0,0 +1,312 @@ +--- +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 +--- +
{{JsSidebar}}
+ +

This part of the JavaScript section on MDN serves as a repository of facts about the JavaScript language. Read more about this reference.

+ +

Built-ins

+ +

JavaScript standard built-in objects, along with their methods and properties.

+ + + + + + + + + +

Statements

+ +

JavaScript statements and declarations

+ + + + + +

Expressions and operators

+ +

JavaScript expressions and operators

+ +
+ + + + + +
+ +

Functions

+ +

This chapter documents how to work with JavaScript functions to develop your applications.

+ + + +

Additional reference pages

+ + diff --git a/files/my/web/javascript/reference/statements/function_star_/index.html b/files/my/web/javascript/reference/statements/function_star_/index.html new file mode 100644 index 0000000000..414d5f4d63 --- /dev/null +++ b/files/my/web/javascript/reference/statements/function_star_/index.html @@ -0,0 +1,252 @@ +--- +title: function* +slug: Web/JavaScript/Reference/Statements/function* +translation_of: Web/JavaScript/Reference/Statements/function* +--- +
{{jsSidebar("Statements")}}
+ +

The function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a {{jsxref("Global_Objects/Generator","Generator")}} object.

+ +
{{EmbedInteractiveExample("pages/js/statement-functionasterisk.html")}}
+ + + +

You can also define generator functions using the {{jsxref("GeneratorFunction")}} constructor, or the function expression syntax.

+ +

Syntax

+ +
function* name([param[, param[, ... param]]]) {
+   statements
+}
+
+ +
+
name
+
The function name.
+
param {{optional_inline}}
+
The name of a formal parameter for the function.
+
statements
+
The statements comprising the body of the function.
+
+ +

Description

+ +

Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances.

+ +

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 Callback Hell and Inversion of Control. However, an even simpler solution to these problems can be achieved with {{jsxref("Statements/async_function", "async functions")}}.

+ +

Calling a generator function does not execute its body immediately; an iterator object for the function is returned instead. When the iterator's next() 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 next() method returns an object with a value property containing the yielded value and a done property which indicates whether the generator has yielded its last value, as a boolean. Calling the next() method with an argument will resume the generator function execution, replacing the yield expression where an execution was paused with the argument from next().

+ +

A return statement in a generator, when executed, will make the generator finish (i.e. the done property of the object returned by it will be set to true). If a value is returned, it will be set as the value property of the object returned by the generator.
+ Much like a return statement, an error is thrown inside the generator will make the generator finished -- unless caught within the generator's body.
+ When a generator is finished, subsequent next() calls will not execute any of that generator's code, they will just return an object of this form: {value: undefined, done: true}.

+ +

Examples

+ +

Simple example

+ +
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
+// ...
+ +

Example with yield*

+ +
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
+
+ +

Passing arguments into Generators

+ +
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
+
+ +

Return statement in a generator

+ +
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 }
+
+ +

Generator as an object property

+ +
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 }
+
+ +

Generator as an object method

+ +
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 }
+
+ +

Generator as a computed property

+ +
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' ]
+
+ +

Generators are not constructable

+ +
function* f() {}
+var obj = new f; // throws "TypeError: f is not a constructor
+
+ +

Generator defined in an expression

+ +
const foo = function* () {
+  yield 10;
+  yield 20;
+};
+
+const bar = foo();
+console.log(bar.next()); // {value: 10, done: false}
+ +

Generator example

+ +
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
+}
+ +

Specifications

+ + + + + + + + + + + + +
Specification
{{SpecName('ESDraft', '#sec-generator-function-definitions', 'function*')}}
+ +

Browser compatibility

+ +
+ + +

{{Compat("javascript.statements.generator_function")}}

+
+ +

See also

+ + diff --git a/files/my/web/javascript/reference/statements/index.html b/files/my/web/javascript/reference/statements/index.html new file mode 100644 index 0000000000..b5f4f3d5e0 --- /dev/null +++ b/files/my/web/javascript/reference/statements/index.html @@ -0,0 +1,130 @@ +--- +title: Statements and declarations +slug: Web/JavaScript/Reference/Statements +tags: + - JavaScript + - Landing page + - NeedsTranslation + - Reference + - TopicStub + - statements +translation_of: Web/JavaScript/Reference/Statements +--- +
{{jsSidebar("Statements")}}
+ +

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.

+ +

Statements and declarations by category

+ +

For an alphabetical listing see the sidebar on the left.

+ +

Control flow

+ +
+
{{jsxref("Statements/block", "Block")}}
+
A block statement is used to group zero or more statements. The block is delimited by a pair of curly brackets.
+
{{jsxref("Statements/break", "break")}}
+
Terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.
+
{{jsxref("Statements/continue", "continue")}}
+
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.
+
{{jsxref("Statements/Empty", "Empty")}}
+
An empty statement is used to provide no statement, although the JavaScript syntax would expect one.
+
{{jsxref("Statements/if...else", "if...else")}}
+
Executes a statement if a specified condition is true. If the condition is false, another statement can be executed.
+
{{jsxref("Statements/switch", "switch")}}
+
Evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case.
+
{{jsxref("Statements/throw", "throw")}}
+
Throws a user-defined exception.
+
{{jsxref("Statements/try...catch", "try...catch")}}
+
Marks a block of statements to try, and specifies a response, should an exception be thrown.
+
+ +

Declarations

+ +
+
{{jsxref("Statements/var", "var")}}
+
Declares a variable, optionally initializing it to a value.
+
{{jsxref("Statements/let", "let")}}
+
Declares a block scope local variable, optionally initializing it to a value.
+
{{jsxref("Statements/const", "const")}}
+
Declares a read-only named constant.
+
+ +

Functions and classes

+ +
+
{{jsxref("Statements/function", "function")}}
+
Declares a function with the specified parameters.
+
{{jsxref("Statements/function*", "function*")}}
+
Generator Functions enable writing iterators more easily.
+
{{jsxref("Statements/async_function", "async function")}}
+
Declares an async function with the specified parameters.
+
{{jsxref("Statements/return", "return")}}
+
Specifies the value to be returned by a function.
+
{{jsxref("Statements/class", "class")}}
+
Declares a class.
+
+ +

Iterations

+ +
+
{{jsxref("Statements/do...while", "do...while")}}
+
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.
+
{{jsxref("Statements/for", "for")}}
+
Creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement executed in the loop.
+
{{jsxref("Statements/for_each...in", "for each...in")}} 
+
Iterates a specified variable over all values of object's properties. For each distinct property, a specified statement is executed.
+
{{jsxref("Statements/for...in", "for...in")}}
+
Iterates over the enumerable properties of an object, in arbitrary order. For each distinct property, statements can be executed.
+
{{jsxref("Statements/for...of", "for...of")}}
+
Iterates over iterable objects (including {{jsxref("Global_Objects/Array","arrays","","true")}}, array-like objects, iterators and generators), invoking a custom iteration hook with statements to be executed for the value of each distinct property.
+
{{jsxref("Statements/for-await...of", "for await...of")}}
+
Iterates over async iterable objects, array-like objects, iterators and generators, invoking a custom iteration hook with statements to be executed for the value of each distinct property.
+
{{jsxref("Statements/while", "while")}}
+
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.
+
+ +

Others

+ +
+
{{jsxref("Statements/debugger", "debugger")}}
+
Invokes any available debugging functionality. If no debugging functionality is available, this statement has no effect.
+
{{jsxref("Statements/export", "export")}}
+
Used to export functions to make them available for imports in external modules, and other scripts.
+
{{jsxref("Statements/import", "import")}}
+
Used to import functions exported from an external module, another script.
+
import.meta
+
An object exposing context-specific metadata to a JavaScript module.
+
{{jsxref("Statements/label", "label")}}
+
Provides a statement with an identifier that you can refer to using a break or continue statement.
+
+ +
+
{{jsxref("Statements/with", "with")}} 
+
Extends the scope chain for a statement.
+
+ +

Specifications

+ + + + + + + + + + +
Specification
{{SpecName('ESDraft', '#sec-ecmascript-language-statements-and-declarations', 'ECMAScript Language: Statements and Declarations')}}
+ +

Browser compatibility

+ + + +

{{Compat("javascript.statements")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf