aboutsummaryrefslogtreecommitdiff
path: root/files/vi/web/javascript/reference/global_objects/string
diff options
context:
space:
mode:
authorRyan Johnson <rjohnson@mozilla.com>2021-04-29 16:16:42 -0700
committerGitHub <noreply@github.com>2021-04-29 16:16:42 -0700
commit95aca4b4d8fa62815d4bd412fff1a364f842814a (patch)
tree5e57661720fe9058d5c7db637e764800b50f9060 /files/vi/web/javascript/reference/global_objects/string
parentee3b1c87e3c8e72ca130943eed260ad642246581 (diff)
downloadtranslated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.gz
translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.bz2
translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.zip
remove retired locales (#699)
Diffstat (limited to 'files/vi/web/javascript/reference/global_objects/string')
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/index.html405
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/match/index.html160
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/normalize/index.html146
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/repeat/index.html118
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/replace/index.html233
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/slice/index.html138
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/startswith/index.html128
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/substr/index.html121
-rw-r--r--files/vi/web/javascript/reference/global_objects/string/substring/index.html195
9 files changed, 0 insertions, 1644 deletions
diff --git a/files/vi/web/javascript/reference/global_objects/string/index.html b/files/vi/web/javascript/reference/global_objects/string/index.html
deleted file mode 100644
index c9f5680a0c..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/index.html
+++ /dev/null
@@ -1,405 +0,0 @@
----
-title: String
-slug: Web/JavaScript/Reference/Global_Objects/String
-tags:
- - ECMAScript6
- - JavaScript
- - NeedsTranslation
- - Reference
- - String
- - TopicStub
-translation_of: Web/JavaScript/Reference/Global_Objects/String
----
-<div>{{JSRef}}</div>
-<h2 id="lnyannini">lnyannini</h2>
-
-<h3 id="HTML">HTML</h3>
-
-<pre class="brush: html notranslate">Nội dung HTML mẫu</pre>
-
-<h3 id="CSS">CSS</h3>
-
-<pre class="brush: css notranslate">Nội dung CSS mẫu</pre>
-
-<h3 id="JavaScript">JavaScript</h3>
-
-<pre class="brush: js notranslate">Nội dung JavaScript mẫu</pre>
-
-<h3 id="Kết_quả">Kết quả</h3>
-
-<p>{{EmbedLiveSample('lnyannini')}}</p>
-f}}</div>
-
-<p><sup><sub>Copy dtoc: june-12-2017</sub></sup><br>
- The <strong><code>String</code></strong> global object is a constructor for strings, or a sequence of characters.<br>
- <sup><sub>Đối tượng Chuỗi toàn cục là một constructor cho chuỗi, hoặc chuỗi ký tự.</sub></sup></p>
-
-<h2 id="Syntax">Syntax</h2>
-
-<p>String literals take the forms:</p>
-
-<pre class="syntaxbox notranslate">'string text'
-"string text"
-"中文 español deutsch English हिन्दी العربية português বাংলা русский 日本語 ਪੰਜਾਬੀ 한국어 தமிழ் עברית"</pre>
-
-<p>Strings can also be created using the <code>String</code> global object directly:</p>
-
-<pre class="syntaxbox notranslate">String(thing)</pre>
-
-<h3 id="Parameters">Parameters</h3>
-
-<dl>
- <dt><code>thing</code></dt>
- <dd>Anything to be converted to a string.</dd>
-</dl>
-
-<h3 id="Template_literals">Template literals</h3>
-
-<p>Starting with ECMAScript 2015, string literals can also be so-called <a href="/en-US/docs/Web/JavaScript/Reference/Template_literals">Template literals</a>:<br>
- <sup><sub>Trong ES6 Chuỗi cũng được gọi là Template Strings.</sub></sup></p>
-
-<pre class="syntaxbox notranslate">`hello world`
-`hello!
- world!`
-`hello ${who}`
-escape `&lt;a&gt;${who}&lt;/a&gt;`</pre>
-
-<dl>
-</dl>
-
-<h3 id="Escape_notation">Escape notation</h3>
-
-<p>Beside regular, printable characters, special characters can be encoded using escape notation:<br>
- <sup><sub>Ngoài ký tự thường, các ký tự đặc biệt có thể được code ra bằng cách dùng các ký hiệu loại trừ:</sub></sup></p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Code</th>
- <th scope="col">Output</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>\0</code></td>
- <td>the NULL character</td>
- </tr>
- <tr>
- <td><code>\'</code></td>
- <td>single quote</td>
- </tr>
- <tr>
- <td><code>\"</code></td>
- <td>double quote</td>
- </tr>
- <tr>
- <td><code>\\</code></td>
- <td>backslash</td>
- </tr>
- <tr>
- <td><code>\n</code></td>
- <td>new line</td>
- </tr>
- <tr>
- <td><code>\r</code></td>
- <td>carriage return</td>
- </tr>
- <tr>
- <td><code>\v</code></td>
- <td>vertical tab</td>
- </tr>
- <tr>
- <td><code>\t</code></td>
- <td>tab</td>
- </tr>
- <tr>
- <td><code>\b</code></td>
- <td>backspace</td>
- </tr>
- <tr>
- <td><code>\f</code></td>
- <td>form feed</td>
- </tr>
- <tr>
- <td><code>\uXXXX</code></td>
- <td>unicode codepoint</td>
- </tr>
- <tr>
- <td><code>\u{X}</code> ... <code>\u{XXXXXX}</code></td>
- <td>unicode codepoint {{experimental_inline}}</td>
- </tr>
- <tr>
- <td><code>\xXX</code></td>
- <td>the Latin-1 character</td>
- </tr>
- </tbody>
-</table>
-
-<div class="note">
-<p>Unlike some other languages, JavaScript makes no distinction between single-quoted strings and double-quoted strings; therefore, the escape sequences above work in strings created with either single or double quotes.</p>
-</div>
-
-<dl>
-</dl>
-
-<h3 id="Long_literal_strings">Long literal strings</h3>
-
-<p>Sometimes, your code will include strings which are very long. Rather than having lines that go on endlessly, or wrap at the whim of your editor, you may wish to specifically break the string into multiple lines in the source code without affecting the actual string contents. There are two ways you can do this.</p>
-
-<p>You can use the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Addition_()">+</a> operator to append multiple strings together, like this:</p>
-
-<pre class="brush: js notranslate">let longString = "This is a very long string which needs " +
- "to wrap across multiple lines because " +
- "otherwise my code is unreadable.";
-</pre>
-
-<p>Or you can use the backslash character ("\") at the end of each line to indicate that the string will continue on the next line. Make sure there is no space or any other character after the backslash (except for a line break), or as an indent; otherwise it will not work. That form looks like this:</p>
-
-<pre class="brush: js notranslate">let longString = "This is a very long string which needs \
-to wrap across multiple lines because \
-otherwise my code is unreadable.";
-</pre>
-
-<p>Both of these result in identical strings being created.</p>
-
-<h2 id="Description">Description</h2>
-
-<p>Strings are useful for holding data that can be represented in text form. Some of the most-used operations on strings are to check their {{jsxref("String.length", "length")}}, to build and concatenate them using the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/String_Operators">+ and += string operators</a>, checking for the existence or location of substrings with the {{jsxref("String.prototype.indexOf()", "indexOf()")}} method, or extracting substrings with the {{jsxref("String.prototype.substring()", "substring()")}} method.</p>
-
-<h3 id="Character_access">Character access</h3>
-
-<p>There are two ways to access an individual character in a string. The first is the {{jsxref("String.prototype.charAt()", "charAt()")}} method:</p>
-
-<pre class="brush: js notranslate">return 'cat'.charAt(1); // returns "a"
-</pre>
-
-<p>The other way (introduced in ECMAScript 5) is to treat the string as an array-like object, where individual characters correspond to a numerical index:</p>
-
-<pre class="brush: js notranslate">return 'cat'[1]; // returns "a"
-</pre>
-
-<p>For character access using bracket notation, attempting to delete or assign a value to these properties will not succeed. The properties involved are neither writable nor configurable. (See {{jsxref("Object.defineProperty()")}} for more information.)</p>
-
-<h3 id="Comparing_strings">Comparing strings</h3>
-
-<p>C developers have the <code>strcmp()</code> function for comparing strings. In JavaScript, you just use the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators">less-than and greater-than operators</a>:</p>
-
-<pre class="brush: js notranslate">var a = 'a';
-var b = 'b';
-if (a &lt; b) { // true
- console.log(a + ' is less than ' + b);
-} else if (a &gt; b) {
- console.log(a + ' is greater than ' + b);
-} else {
- console.log(a + ' and ' + b + ' are equal.');
-}
-</pre>
-
-<p>A similar result can be achieved using the {{jsxref("String.prototype.localeCompare()", "localeCompare()")}} method inherited by <code>String</code> instances.</p>
-
-<h3 id="Distinction_between_string_primitives_and_String_objects">Distinction between string primitives and <code>String</code> objects</h3>
-
-<p>Note that JavaScript distinguishes between <code>String</code> objects and primitive string values. (The same is true of {{jsxref("Boolean")}} and {{jsxref("Global_Objects/Number", "Numbers")}}.)</p>
-
-<p>String literals (denoted by double or single quotes) and strings returned from <code>String</code> calls in a non-constructor context (i.e., without using the {{jsxref("Operators/new", "new")}} keyword) are primitive strings. JavaScript automatically converts primitives to <code>String</code> objects, so that it's possible to use <code>String</code> object methods for primitive strings. In contexts where a method is to be invoked on a primitive string or a property lookup occurs, JavaScript will automatically wrap the string primitive and call the method or perform the property lookup.</p>
-
-<pre class="brush: js notranslate">var s_prim = 'foo';
-var s_obj = new String(s_prim);
-
-console.log(typeof s_prim); // Logs "string"
-console.log(typeof s_obj); // Logs "object"
-</pre>
-
-<p>String primitives and <code>String</code> objects also give different results when using {{jsxref("Global_Objects/eval", "eval()")}}. Primitives passed to <code>eval</code> are treated as source code; <code>String</code> objects are treated as all other objects are, by returning the object. For example:</p>
-
-<pre class="brush: js notranslate">var s1 = '2 + 2'; // creates a string primitive
-var s2 = new String('2 + 2'); // creates a String object
-console.log(eval(s1)); // returns the number 4
-console.log(eval(s2)); // returns the string "2 + 2"
-</pre>
-
-<p>For these reasons, code may break when it encounters <code>String</code> objects when it expects a primitive string instead, although generally authors need not worry about the distinction.</p>
-
-<p>A <code>String</code> object can always be converted to its primitive counterpart with the {{jsxref("String.prototype.valueOf()", "valueOf()")}} method.</p>
-
-<pre class="brush: js notranslate">console.log(eval(s2.valueOf())); // returns the number 4
-</pre>
-
-<div class="note"><strong>Note:</strong> For another possible approach to strings in JavaScript, please read the article about <a href="/en-US/Add-ons/Code_snippets/StringView"><code>StringView</code> — a C-like representation of strings based on typed arrays</a>.</div>
-
-<h2 id="Properties">Properties</h2>
-
-<dl>
- <dt>{{jsxref("String.prototype")}}</dt>
- <dd>Allows the addition of properties to a <code>String</code> object.</dd>
-</dl>
-
-<h2 id="Methods">Methods</h2>
-
-<dl>
- <dt>{{jsxref("String.fromCharCode()")}}</dt>
- <dd>Returns a string created by using the specified sequence of Unicode values.</dd>
- <dt>{{jsxref("String.fromCodePoint()")}} {{experimental_inline}}</dt>
- <dd>Returns a string created by using the specified sequence of code points.</dd>
- <dt>{{jsxref("String.raw()")}} {{experimental_inline}}</dt>
- <dd>Returns a string created from a raw template string.</dd>
-</dl>
-
-<h2 id="String_generic_methods"><code>String</code> generic methods</h2>
-
-<div class="warning">
-<p><strong>String generics are non-standard, deprecated and will get removed near future</strong>.</p>
-</div>
-
-<p>The <code>String</code> instance methods are also available in Firefox as of JavaScript 1.6 (<strong>not</strong> part of the ECMAScript standard) on the <code>String</code> object for applying <code>String</code> methods to any object:</p>
-
-<pre class="brush: js notranslate">var num = 15;
-console.log(String.replace(num, /5/, '2'));
-</pre>
-
-<p>For migrating away from String generics, see also <a href="/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_string_generics">Warning: String.x is deprecated; use String.prototype.x instead</a>.</p>
-
-<p>{{jsxref("Global_Objects/Array", "Generics", "#Array_generic_methods", 1)}} are also available on {{jsxref("Array")}} methods.</p>
-
-<h2 id="String_instances"><code>String</code> instances</h2>
-
-<h3 id="Properties_2">Properties</h3>
-
-<div>{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'Properties')}}</div>
-
-<h3 id="Methods_2">Methods</h3>
-
-<h4 id="Methods_unrelated_to_HTML">Methods unrelated to HTML</h4>
-
-<div>{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'Methods_unrelated_to_HTML')}}</div>
-
-<h4 id="HTML_wrapper_methods">HTML wrapper methods</h4>
-
-<div>{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/prototype', 'HTML_wrapper_methods')}}</div>
-
-<h2 id="Examples">Examples</h2>
-
-<h3 id="String_conversion">String conversion</h3>
-
-<p>It's possible to use <code>String</code> as a "safer" {{jsxref("String.prototype.toString()", "toString()")}} alternative, although it still normally calls the underlying <code>toString()</code>. It also works for {{jsxref("null")}}, {{jsxref("undefined")}}, and for {{jsxref("Symbol", "symbols")}}. For example:</p>
-
-<pre class="brush: js notranslate">var outputStrings = [];
-for (var i = 0, n = inputValues.length; i &lt; n; ++i) {
- outputStrings.push(String(inputValues[i]));
-}
-</pre>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Initial definition.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.5', 'String')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ES2015', '#sec-string-objects', 'String')}}</td>
- <td>{{Spec2('ES2015')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string-objects', 'String')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatChrome("1")}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td><code>\u{XXXXXX}</code></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatGeckoDesktop("40")}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Edge</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td><code>\u{XXXXXX}</code></td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatGeckoMobile("40")}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li>{{domxref("DOMString")}}</li>
- <li><a href="/en-US/Add-ons/Code_snippets/StringView"><code>StringView</code> — a C-like representation of strings based on typed arrays</a></li>
- <li><a href="/en-US/docs/Web/API/DOMString/Binary">Binary strings</a></li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/match/index.html b/files/vi/web/javascript/reference/global_objects/string/match/index.html
deleted file mode 100644
index d40ffc4482..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/match/index.html
+++ /dev/null
@@ -1,160 +0,0 @@
----
-title: String.prototype.match()
-slug: Web/JavaScript/Reference/Global_Objects/String/match
-tags:
- - Biểu thức chính quy
- - Chuỗi
- - Phương Thức
-translation_of: Web/JavaScript/Reference/Global_Objects/String/match
----
-<div>{{JSRef}}</div>
-
-<div> </div>
-
-<p><code><font face="Open Sans, arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">Phương thức </span></font><strong>match()</strong></code> đưa ra những so khớp khi so khớp một <em>chuỗi (string) </em>với<em> biểu thức chính quy.</em></p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><var>str</var>.match(<var>regexp</var>)</pre>
-
-<h3 id="Tham_số">Tham số</h3>
-
-<dl>
- <dt><code>regexp</code></dt>
- <dd>Đối tượng biểu thức chính quy.  Nếu một đối tượng <code>obj</code> không phải biểu thức chính quy được truyền vào, nó sẽ ngầm chuyển đổi thành một {{jsxref("RegExp")}} bằng cách sử dụng <code>new RegExp(obj)</code>. Nếu bạn không truyền tham số và sử dụng trực tiếp phương thức match(), bạn sẽ nhận lại một {{jsxref("Array")}} với một chuỗi rỗng: [""].</dd>
-</dl>
-
-<h3 id="Giá_trị_trả_về">Giá trị trả về</h3>
-
-<p>Nếu một chuỗi khớp với biểu thức, nó sẽ trả lại một {{jsxref("Array")}} chứa chuỗi khớp hoàn toàn là phần tử đầu tiên, tiếp đó là các kết quả nằm trong dấu ngoặc đơn (ngoặc có nhớ). Nếu không có so khớp, nó sẽ trả về {{jsxref("null")}}.</p>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p>Nếu một biểu thức chính quy không có cờ <code>g</code>, <code>str.match()</code> trả về kết quả giống như  {{jsxref("RegExp.prototype.exec()", "RegExp.exec()")}}. {{jsxref("Array")}} trả về có thêm thuộc tính <code>input</code> chứa chuỗi ban đầu được phân tích ngữ pháp. Thêm nữa, nó có một thuộc tính <code>index</code> đại diện cho chỉ mục (tính từ 0) của so khớp trong chuỗi.</p>
-
-<p>Nếu biểu thức chính quy có cờ <code>g</code>, phương thức trả về một {{jsxref("Array")}} chứa tất cả chuỗi con khớp mà không phải các đối tượng khớp. Nó không trả về chuỗi trong dấu ngoặc tròn có nhớ. Nếu không có so khớp, phương thức trả về {{jsxref("null")}}.</p>
-
-<h3 id="Xem_thêm_Các_phương_thức_RegEx">Xem thêm: Các phương thức <code>RegEx</code></h3>
-
-<ul>
- <li>Trường hợp bạn cần biết liệu một chuỗi có khớp với biểu thức chính quy {{jsxref("RegExp")}} hay không, sử dụng {{jsxref("RegExp.prototype.test()", "RegExp.test()")}}.</li>
- <li>Nếu chỉ muốn xem so khớp đầu tiên được tìm thấy, bạn sử dụng {{jsxref("RegExp.prototype.exec()", "RegExp.exec()")}}.</li>
- <li>Nếu bạn muốn lấy nhóm trong ngoặc có nhớ và xét cờ, bạn cần sử dụng {{jsxref("RegExp.prototype.exec()", "RegExp.exec()")}}.</li>
-</ul>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Sử_dụng_match()">Sử dụng <code>match()</code></h3>
-
-<p>Trong ví dụ dưới đây, <code>match()</code> được dùng để tìm chuỗi <code>'Chapter '</code> theo sau là một hoặc nhiều kí tự số, tiếp đó là <em>một dấu chấm <code>.</code> thập phân và một số </em>lặp lại 0 hoặc nhiều lần. Biểu thức chính quy có cờ <code>i</code> nên không phân biệt chữ hoa và thường.</p>
-
-<pre class="brush: js">var str = 'For more information, see Chapter 3.4.5.1';
-var re = /see (chapter \d+(\.\d)*)/i;
-var found = str.match(re);
-
-console.log(found);
-
-// logs [ 'see Chapter 3.4.5.1',
-// 'Chapter 3.4.5.1',
-// '.1',
-// index: 22,
-// input: 'For more information, see Chapter 3.4.5.1' ]
-
-// 'see Chapter 3.4.5.1' là so khớp toàn bộ.
-// 'Chapter 3.4.5.1' được bắt bởi '(chapter \d+(\.\d)*)'.
-// '.1' là giá trị cuối cùng được bắt bởi '(\.\d)'.
-// Thuộc tính 'index' (22) là chỉ mục tính từ 0 của so khớp toàn bộ.
-// Thuộc tính 'input' là chuỗi gốc đã được phân tích ngữ pháp.</pre>
-
-<h3 id="Sử_dụng_cờ_toàn_cục_và_cờ_không_phân_biệt_chữ_hoathường_với_match()">Sử dụng cờ toàn cục và cờ không phân biệt chữ hoa/thường với <code>match()</code></h3>
-
-<p>Ví dụ dưới đây mô tả cách sử dụng cờ <code>g</code> và cờ <code>i </code>với <code>match()</code>. Tất cả chữ A tớ E và a tới e sẽ được trả lại và mỗi phần từ khớp nằm trong mảng.</p>
-
-<pre class="brush: js">var str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
-var regexp = /[A-E]/gi;
-var matches_array = str.match(regexp);
-
-console.log(matches_array);
-// ['A', 'B', 'C', 'D', 'E', 'a', 'b', 'c', 'd', 'e']
-</pre>
-
-<h3 id="Sử_dụng_match()_không_truyền_tham_số">Sử dụng <code>match()</code> không truyền tham số</h3>
-
-<pre class="brush: js">var str = "Nothing will come of nothing.";
-
-str.match(); //trả về [""]</pre>
-
-<h3 id="Một_đối_tượng_không_phải_biểu_thức_chính_quy_được_coi_như_một_tham_số">Một đối tượng không phải biểu thức chính quy được coi như một tham số</h3>
-
-<p>Khi tham số là một chuỗi hoặc một số, ngầm định, nó được chuyển đổi thành một {{jsxref("RegExp")}} sử dụng new RegExp(obj). Nếu nó là một số dương với một dấu dương, phương thức Regexp() sẽ bỏ qua dấu dương.</p>
-
-<pre class="brush: js">var str1 = "NaN means not a number. Infinity contains -Infinity and +Infinity in JavaScript.",
- str2 = "My grandfather is 65 years old and My grandmother is 63 years old.",
- str3 = "The contract was declared null and void.";
-str1.match("number");   // "number" là một chuỗi. Trả về ["number"]
-str1.match(NaN);   // kiểu của NaN là kiểu number. Trả về ["NaN"]
-str1.match(Infinity);   // kiểu của Infinity là number. Trả về ["Infinity"]
-str1.match(+Infinity);  // Trả về ["Infinity"]
-str1.match(-Infinity);  // Trả về ["-Infinity"]
-str2.match(65);   // Trả về ["65"]
-str2.match(+65);   // Một số với dấu dương. Trả về ["65"]
-str3.match(null);   // Trả về ["null"]</pre>
-
-<h2 id="Thông_số">Thông số</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Thông số</th>
- <th scope="col">Trạng thái</th>
- <th scope="col">Bình luận</th>
- </tr>
- <tr>
- <td>{{SpecName('ES3')}}</td>
- <td>{{Spec2('ES3')}}</td>
- <td>
- <p>Định nghĩa ban đầu. Được bổ sung trong JavaScript 1.2.</p>
- </td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.5.4.10', 'String.prototype.match')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.match', 'String.prototype.match')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.match', 'String.prototype.match')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Tương_thích_trình_duyệt">Tương thích trình duyệt</h2>
-
-<p class="hidden">Bảng tương thích trong trang này được tạo ra từ dữ liệu cấu trúc. Nếu bạn muốn đóng góp vào dữ liệu, hãy kiểm tra <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> và gửi một yêu cầu pull tới chúng tôi.</p>
-
-<p>{{Compat("javascript.builtins.String.match")}}</p>
-
-<h2 id="Lưu_ý_cho_Firefox">Lưu ý cho Firefox</h2>
-
-<ul>
- <li>các cờ <code>flags</code> từng không phải đối số thứ hai tiêu chuẩn, nó chỉ có hiệu lực trong Gecko: <var>str</var>.match(<var>regexp, flags</var>)</li>
- <li>Bắt đầu từ Gecko 27 {{geckoRelease(27)}}, phương thức này đã được điều chỉnh để phù hợp với ECMAScript. Khi <code>match()</code> được gọi với một biểu thức chính quy toàn cục, thuộc tính {{jsxref("RegExp.lastIndex")}} (nếu nó được chỉ định) sẽ được đưa về <code>0</code> ({{bug(501739)}}).</li>
- <li>Từ Gecko 39 {{geckoRelease(39)}}, đối số <code>flags</code> không chuẩn  không được chấp nhận và sẽ có cảnh báo ({{bug(1142351)}}) trên giao diện điều khiển.</li>
- <li> Từ Gecko 47 {{geckoRelease(47)}}, đối số <code>flags</code> không chuẩn không còn được hỗ trợ trong các phiên bản chưa phát hành và sẽ sớm bị gỡ bỏ {{bug(1245801)}}) hoàn toàn.</li>
- <li>Từ Gecko 49 {{geckoRelease(49)}}, đối số <code>flags</code> không chuẩn còn còn được hỗ trợ ({{bug(1108382)}}).</li>
- <li>Starting with Gecko 49 {{geckoRelease(49)}}, the non-standard <code>flags</code> argument is no longer supported ({{bug(1108382)}}).</li>
-</ul>
-
-<h2 id="Xem_thêm">Xem thêm</h2>
-
-<ul>
- <li>{{jsxref("RegExp")}}</li>
- <li>{{jsxref("RegExp.prototype.exec()")}}</li>
- <li>{{jsxref("RegExp.prototype.test()")}}</li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/normalize/index.html b/files/vi/web/javascript/reference/global_objects/string/normalize/index.html
deleted file mode 100644
index faf26687eb..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/normalize/index.html
+++ /dev/null
@@ -1,146 +0,0 @@
----
-title: String.prototype.normalize()
-slug: Web/JavaScript/Reference/Global_Objects/String/normalize
-tags:
- - Chuỗi
- - ECMAScript 2015
- - JavaScript
- - Phương Thức
- - Prototype
- - String
- - Tham khảo
- - Unicode
-translation_of: Web/JavaScript/Reference/Global_Objects/String/normalize
----
-<div>{{JSRef}}</div>
-
-<p>Phương thức <strong><code>normalize()</code></strong> trả về chuỗi với các ký tự Unicode đã được bình thường hóa (nếu giá trị truyền vào không phải chuỗi, nó sẽ được chuyển thành chuỗi trước).</p>
-
-<div>{{EmbedInteractiveExample("pages/js/string-normalize.html")}}</div>
-
-
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><code><var>str</var>.normalize([<var>form</var>])</code></pre>
-
-<h3 id="Tham_số">Tham số</h3>
-
-<dl>
- <dt><code>form</code></dt>
- <dd>Là một trong các giá trị <code>"NFC"</code>, <code>"NFD"</code>, <code>"NFKC"</code>, hoặc <code>"NFKD"</code>, để chỉ định định dạng Unicode của chuỗi ký tự. Nếu bỏ qua hoặc mang giá trị {{jsxref("undefined")}}, <code>"NFC"</code> sẽ được sử dụng.
- <ul>
- <li><code>NFC</code> — Normalization Form Canonical Composition. (Unicode Dựng Sẵn)</li>
- <li><code>NFD</code> — Normalization Form Canonical Decomposition. (Unicode Tổ Hợp)</li>
- <li><code>NFKC</code> — Normalization Form Compatibility Composition. (Unicode Dựng Sẵn Tương Thích)</li>
- <li><code>NFKD</code> — Normalization Form Compatibility Decomposition. (Unicode Tổ Hợp Tương Thích)</li>
- </ul>
- </dd>
-</dl>
-
-<h3 id="Giá_trị_trả_về">Giá trị trả về</h3>
-
-<p>Một chuỗi mới với các ký tự Unicode đã được bình thường hóa.</p>
-
-<h3 id="Lỗi_có_thể_gây_ra">Lỗi có thể gây ra</h3>
-
-<dl>
- <dt>{{jsxref("RangeError")}}</dt>
- <dd>Phương thức sẽ gây ra lỗi {{jsxref("RangeError")}} nếu như giá trị tham số <code>form</code> không phải là một trong các giá trị liệt kê ở trên.</dd>
-</dl>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p>Phương thức <code>normalize()</code> sẽ trả về một chuỗi mới với các ký tự Unicode đã được bình thường hóa theo một trong các định dạng Unicode Normalization Form. Nó không làm thay đổi chuỗi ban đầu.</p>
-
-<div class="blockIndicator note">
-<p>Đối với tiếng Việt, việc bình thường hóa giữa hai định dạng Canonical hoặc Compatibility (cùng Tổ Hợp hoặc Dựng Sẵn) là như nhau.</p>
-</div>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Sử_dụng_normalize()">Sử dụng <code>normalize()</code></h3>
-
-<pre class="brush: js">// Chuỗi ban đầu
-
-// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
-// U+0323: COMBINING DOT BELOW
-var str = '\u1E9B\u0323';
-
-
-// Canonically-composed form (NFC)
-
-// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
-// U+0323: COMBINING DOT BELOW
-str.normalize('NFC'); // '\u1E9B\u0323'
-str.normalize(); // như trên
-
-
-// Canonically-decomposed form (NFD)
-
-// U+017F: LATIN SMALL LETTER LONG S
-// U+0323: COMBINING DOT BELOW
-// U+0307: COMBINING DOT ABOVE
-str.normalize('NFD'); // '\u017F\u0323\u0307'
-
-
-// Compatibly-composed (NFKC)
-
-// U+1E69: LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE
-str.normalize('NFKC'); // '\u1E69'
-
-
-// Compatibly-decomposed (NFKD)
-
-// U+0073: LATIN SMALL LETTER S
-// U+0323: COMBINING DOT BELOW
-// U+0307: COMBINING DOT ABOVE
-str.normalize('NFKD'); // '\u0073\u0323\u0307'
-
-// So sánh chuỗi tiếng Việt:
-
-// Unicode Dựng Sẵn
-var tvds = 'Tiếng Việt';
-// Unicode Tổ Hợp
-var tvth = 'Tiếng Việt';
-
-console.log(tvds.length); // 10
-console.log(tvth.length); // 14
-console.log(tvds == tvth); // false
-console.log(tvds.normalize('NFC') == tvth.normalize('NFC')); // true
-</pre>
-
-<h2 id="Đặc_tả">Đặc tả</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Đặc tả</th>
- <th scope="col">Trạng thái</th>
- <th scope="col">Ghi chú</th>
- </tr>
- <tr>
- <td>{{SpecName('ES2015', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}</td>
- <td>{{Spec2('ES2015')}}</td>
- <td>Định nghĩa lần đầu.</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Trình_duyệt_hỗ_trợ">Trình duyệt hỗ trợ</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.String.normalize")}}</p>
-
-<h2 id="Xem_thêm">Xem thêm</h2>
-
-<ul>
- <li><a href="http://www.unicode.org/reports/tr15/">Unicode Standard Annex #15, Unicode Normalization Forms</a></li>
- <li><a href="http://en.wikipedia.org/wiki/Unicode_equivalence">Unicode equivalence</a></li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/repeat/index.html b/files/vi/web/javascript/reference/global_objects/string/repeat/index.html
deleted file mode 100644
index 72e2179cf1..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/repeat/index.html
+++ /dev/null
@@ -1,118 +0,0 @@
----
-title: String.prototype.repeat()
-slug: Web/JavaScript/Reference/Global_Objects/String/repeat
-tags:
- - Chuỗi
- - ES6
- - Phương Thức
- - Tham khảo
-translation_of: Web/JavaScript/Reference/Global_Objects/String/repeat
----
-<div>{{JSRef}}</div>
-
-<p>Phương thức <strong><code>repeat()</code></strong> xây dựng và trả về một chuỗi mới chứa số lượng nhất định bản sao chép của chuỗi được gọi tới và nối chung với nhau.</p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><code><var>str</var>.repeat(<var>count</var>);</code>
-</pre>
-
-<h3 id="Tham_số">Tham số</h3>
-
-<dl>
- <dt><code>count</code></dt>
- <dd>Là 0 hoặc số nguyên dương, tức là giá trị nằm trong khoảng: [0, +∞), xác định số lần lặp để tạo chuỗi mới.</dd>
-</dl>
-
-<h3 id="Giá_trị_trả_về">Giá trị trả về</h3>
-
-<p>Một chuỗi mới chứa số lần sao chép (count) chuỗi đầu vào.</p>
-
-<h3 id="Ngoại_lệ">Ngoại lệ</h3>
-
-<ul>
- <li>{{jsxref("Errors/Negative_repetition_count", "RangeError")}}: số lần lặp phải không âm.</li>
- <li>{{jsxref("Errors/Resulting_string_too_large", "RangeError")}}: số lần lặp phải nhỏ hơn vô cực và không vượt kích cỡ chuỗi tối đa.</li>
-</ul>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<pre class="brush: js">'abc'.repeat(-1); // RangeError
-'abc'.repeat(0); // ''
-'abc'.repeat(1); // 'abc'
-'abc'.repeat(2); // 'abcabc'
-'abc'.repeat(3.5); // 'abcabcabc' (tham số đếm sẽ được chuyển thành số nguyên)
-'abc'.repeat(1/0); // RangeError
-
-({ toString: () =&gt; 'abc', repeat: String.prototype.repeat }).repeat(2);
-// 'abcabc' (repeat() is a generic method)
-</pre>
-
-<h2 id="Polyfill">Polyfill</h2>
-
-<p>Phương thức này đã được thêm vào kỹ thuật ES6 và có thể chưa có sẵn trong tất cả các bản bổ sung JS. Tuy nhiên bạn có thể sử dụng polyfill <code>String.prototype.repeat()</code> với snippet dưới đây:</p>
-
-<pre class="brush: js">if (!String.prototype.repeat) {
- String.prototype.repeat = function(count) {
- 'use strict';
- if (this == null) {
- throw new TypeError('can\'t convert ' + this + ' to object');
- }
- var str = '' + this;
- count = +count;
- if (count != count) {
- count = 0;
- }
- if (count &lt; 0) {
- throw new RangeError('repeat count must be non-negative');
- }
- if (count == Infinity) {
- throw new RangeError('repeat count must be less than infinity');
- }
- count = Math.floor(count);
- if (str.length == 0 || count == 0) {
- return '';
- }
-
- // Đảm bảo tham số đếm là số nguyên 31 bít cho phép ta tối ưu hóa nhiều
- // phần chính. Nhưng dù sao thì, hầu hết các trình duyệt hiện tại (tháng Tám năm 2014) không thể xử lý
- // các chuỗi 1 &lt;&lt; 28 chars hoặc lớn hơn, vậy nên:
- if (str.length * count &gt;= 1 &lt;&lt; 28) {
- throw new RangeError('repeat count must not overflow maximum string size');
- }
- var rpt = '';
- for (var i = 0; i &lt; count; i++) {
- rpt += str;
- }
- return rpt;
- }
-}
-</pre>
-
-<h2 id="Thông_số">Thông số</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES2015', '#sec-string.prototype.repeat', 'String.prototype.repeat')}}</td>
- <td>{{Spec2('ES2015')}}</td>
- <td>Định nghĩa bổ sung.</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.repeat', 'String.prototype.repeat')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Tương_thích_trình_duyệt">Tương thích trình duyệt</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.String.repeat")}}</p>
diff --git a/files/vi/web/javascript/reference/global_objects/string/replace/index.html b/files/vi/web/javascript/reference/global_objects/string/replace/index.html
deleted file mode 100644
index b9d5330c6c..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/replace/index.html
+++ /dev/null
@@ -1,233 +0,0 @@
----
-title: String.prototype.replace()
-slug: Web/JavaScript/Reference/Global_Objects/String/replace
-translation_of: Web/JavaScript/Reference/Global_Objects/String/replace
----
-<div>{{JSRef}}</div>
-
-<p>Phương thức <strong><code>replace()</code></strong> sẽ trả về một chuỗi mới với một vài (hoặc tất cả) phần tử trùng khớp với <code>pattern</code> được thay thế bằng <code>replacement</code>. Pattern có thể là một chuỗi, hoặc một {{jsxref("RegExp")}}, và replacement có thể là một chuỗi, hoặc một function được gọi áp dụng cho mỗi kết quả trùng khớp. Nếu pattern là một chuỗi, thì phương thức replace() chỉ trả về kết quả đầu tiên trùng khớp.</p>
-
-<p>Replace() không làm thay đổi chuỗi gốc.</p>
-
-<div>{{EmbedInteractiveExample("pages/js/string-replace.html")}}</div>
-
-
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox notranslate">const newStr = <var>str</var>.replace(<var>regexp</var>|<var>substr</var>, <var>newSubstr</var>|<var>function</var>)</pre>
-
-<h3 id="Parameters">Parameters</h3>
-
-<dl>
- <dt><code><var>regexp</var></code> (pattern)</dt>
- <dd>Một {{jsxref("RegExp")}} object hoặc biểu thức RegEx. Phần tử được match sẽ được thay thế bởi <code><var>newSubstr</var></code> hoặc giá trị trả về bởi <code><var>function</var></code>.</dd>
- <dt><code><var>substr</var></code></dt>
- <dd>Một {{jsxref("String")}} cái mà sẽ bị thay thế bởi <code><var>newSubstr</var></code>. String này sẽ được xem như là một literal string và không phải là một regular expression. Nên chỉ có phần tử trùng khớp đầu tiên sẽ bị thay thế.</dd>
- <dt><code><var>newSubstr</var></code> (replacement)</dt>
- <dd>Một {{jsxref("String")}} có nhiệm vụ thay thế substr được chỉ định trong <code><var>regexp</var></code> hoặc <code><var>substr</var></code>. Có nhiều kiểu thay thế khác nhau, xem chi tiết tại phần "<a href="#Specifying_a_string_as_a_parameter">Specifying a string as a parameter</a>" bên dưới.</dd>
- <dt><code><var>function</var></code> (replacement)</dt>
- <dd>Function được định nghĩa và gọi để sử dụng cho việc thay thế các phần tử trùng khớp với regexp hoặc substr. Đối số của function này có thể là các loại sau, xem chi tiết tại phần: "<a href="#Specifying_a_function_as_a_parameter">Specifying a function as a parameter</a>" bên dưới.</dd>
-</dl>
-
-<h3 id="Return_value">Return value</h3>
-
-<p>Một string mới, với một số phần tử trùng khớp (hoặc tất cả phần tử trùng khớp) đã bị thay thế bởi các replacement.</p>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p>Phương thức này không làm thay đổi {{jsxref("String")}} gốc. Nó chỉ đơn giản tạo ra một string mới.</p>
-
-<p>Để thực hiện tìm kiếm global search và replace, hãy thêm từ khóa <code>g</code> và biểu thức regular expression.</p>
-
-<h3 id="Specifying_a_string_as_a_parameter">Specifying a string as a parameter</h3>
-
-<p>The replacement string can include the following special replacement patterns:</p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th class="header" scope="col">Pattern</th>
- <th class="header" scope="col">Inserts</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>$$</code></td>
- <td>Inserts a <code>"$"</code>.</td>
- </tr>
- <tr>
- <td><code>$&amp;</code></td>
- <td>Inserts the matched substring.</td>
- </tr>
- <tr>
- <td><code>$`</code></td>
- <td>Inserts the portion of the string that precedes the matched substring.</td>
- </tr>
- <tr>
- <td><code>$'</code></td>
- <td>Inserts the portion of the string that follows the matched substring.</td>
- </tr>
- <tr>
- <td><code>$<var>n</var></code></td>
- <td>Where <code><var>n</var></code> is a positive integer less than 100, inserts the <code><var>n</var></code>th parenthesized submatch string, provided the first argument was a {{jsxref("RegExp")}} object. Note that this is <code>1</code>-indexed.</td>
- </tr>
- </tbody>
-</table>
-
-<h3 id="Specifying_a_function_as_a_parameter">Specifying a function as a parameter</h3>
-
-<p>You can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string. (<strong>Note:</strong> The above-mentioned special replacement patterns do <em>not</em> apply in this case.)</p>
-
-<p>Note that the function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.</p>
-
-<p>The arguments to the function are as follows:</p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th class="header" scope="col">Possible name</th>
- <th class="header" scope="col">Supplied value</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>match</code></td>
- <td>The matched substring. (Corresponds to <code>$&amp;</code> above.)</td>
- </tr>
- <tr>
- <td><code>p1, p2, ...</code></td>
- <td>The <var>n</var>th string found by a parenthesized capture group, provided the first argument to <code>replace()</code> was a {{jsxref("RegExp")}} object. (Corresponds to <code>$1</code>, <code>$2</code>, etc. above.) For example, if <code>/(\a+)(\b+)/</code>, was given, <code>p1</code> is the match for <code>\a+</code>, and <code>p2</code> for <code>\b+</code>.</td>
- </tr>
- <tr>
- <td><code>offset</code></td>
- <td>The offset of the matched substring within the whole string being examined. (For example, if the whole string was <code>'abcd'</code>, and the matched substring was <code>'bc'</code>, then this argument will be <code>1</code>.)</td>
- </tr>
- <tr>
- <td><code>string</code></td>
- <td>The whole string being examined.</td>
- </tr>
- </tbody>
-</table>
-
-<p>(The exact number of arguments depends on whether the first argument is a {{jsxref("RegExp")}} object—and, if so, how many parenthesized submatches it specifies.)</p>
-
-<p>The following example will set <code>newString</code> to <code>'abc - 12345 - #$*%'</code>:</p>
-
-<pre class="brush: js notranslate">function replacer(match, p1, p2, p3, offset, string) {
- // p1 is nondigits, p2 digits, and p3 non-alphanumerics
- return [p1, p2, p3].join(' - ');
-}
-let newString = 'abc12345#$*%'.replace(/([^\d]*)(\d*)([^\w]*)/, replacer);
-console.log(newString); // abc - 12345 - #$*%
-</pre>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Định_nghĩa_một_biểu_thức_regular_expression_trong_phương_thức_replace">Định nghĩa một biểu thức regular expression trong phương thức replace()</h3>
-
-<p>Ví dụ bên dưới, regular expression được định nghĩa trong <code>replace()</code> và nó có thêm flat "i" (giúp kết quả matching không phân biệt chữ hoa và chữ thường).</p>
-
-<pre class="brush: js notranslate">let str = 'Twas the night before Xmas...';
-let newstr = str.replace(/xmas/i, 'Christmas');
-console.log(newstr); // Twas the night before Christmas...
-</pre>
-
-<p>This logs <code>'Twas the night before Christmas...'</code>.</p>
-
-<div class="blockIndicator note">
-<p><strong>Note:</strong> See <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">this guide</a> for more explanations about regular expressions.</p>
-</div>
-
-<h3 id="Sử_dụng_flag_global_và_flag_ignore_trong_replace">Sử dụng flag global và flag ignore trong replace()</h3>
-
-<p>Global replace (thay thế tất cả kết quả trùng khớp) có thể được thực hiện trong regex. Ví dụ sau, biểu thức regex có chứa các flag  <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags_2">global and ignore case flags</a> cho phép <code>replace()</code> sẽ thay thế mỗi string <code>'apples'</code> trong chuỗi gốc với string <code>'oranges'</code>. </p>
-
-<pre class="brush: js notranslate">let re = /apples/gi;
-let str = 'Apples are round, and apples are juicy.';
-let newstr = str.replace(re, 'oranges');
-console.log(newstr); // oranges are round, and oranges are juicy.
-</pre>
-
-<p>This logs <code>'oranges are round, and oranges are juicy'</code>.</p>
-
-<h3 id="Đảo_ngược_vị_trí_của_2_từ_trong_một_string">Đảo ngược vị trí của 2 từ trong một string</h3>
-
-<p>Đoạn code bên dưới sẽ đảo qua lại vị trí của các từ trong một string. Ở phần replacement, đoạn code sử dụng <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges">capturing groups</a> và ký tự <code>$1,$2</code> để làm pattern cho phần replacement.</p>
-
-<pre class="brush: js notranslate">let re = /(\w+)\s(\w+)/;
-let str = 'John Smith';
-let newstr = str.replace(re, '$2, $1');
-console.log(newstr); // Smith, John
-</pre>
-
-<p>This logs <code>'Smith, John'</code>.</p>
-
-<h3 id="Sử_dụng_một_inline_function_để_thay_đổi_các_giá_trị_matched">Sử dụng một inline function để thay đổi các giá trị matched</h3>
-
-<p>Trong ví dụ này, tất cả trường hợp chữ cái viết hoa trong một string sẽ được convert sang dạng viết thường, và dấu gạch ngang sẽ được thêm vào trước vị trí matching đó. Điều quan trọng ở đây, là cần thêm vào các dấu gạch ngang này trước khi trả về một replacement hoàn chỉnh để sử dụng.</p>
-
-<p>Replacement function này sẽ nhận vào các đoạn trích mà đã match với pattern làm tham số, và sử dụng các đoạn trích đó để biến đổi chữ hoa chữ thường, và ghép nối một dấu gạch ngang vào trước mỗi đoạn trích.</p>
-
-<pre class="brush: js notranslate">function styleHyphenFormat(propertyName) {
- function upperToHyphenLower(match, offset, string) {
- return (offset &gt; 0 ? '-' : '') + match.toLowerCase();
- }
- return propertyName.replace(/[A-Z]/g, upperToHyphenLower);
-}
-</pre>
-
-<p>Given <code>styleHyphenFormat('borderTop')</code>, this returns <code>'border-top'</code>.</p>
-
-<p>Because we want to further transform the <em>result</em> of the match before the final substitution is made, we must use a function. This forces the evaluation of the match prior to the {{jsxref("String.prototype.toLowerCase()", "toLowerCase()")}} method. If we had tried to do this using the match without a function, the {{jsxref("String.prototype.toLowerCase()", "toLowerCase()")}} would have no effect.</p>
-
-<pre class="brush: js example-bad notranslate">let newString = propertyName.replace(/[A-Z]/g, '-' + '$&amp;'.toLowerCase()); // won't work
-</pre>
-
-<p>This is because <code>'$&amp;'.toLowerCase()</code> would first be evaluated as a string literal (resulting in the same <code>'$&amp;'</code>) before using the characters as a pattern.</p>
-
-<h3 id="Replacing_a_Fahrenheit_degree_with_its_Celsius_equivalent">Replacing a Fahrenheit degree with its Celsius equivalent</h3>
-
-<p>The following example replaces a Fahrenheit degree with its equivalent Celsius degree. The Fahrenheit degree should be a number ending with <code>"F"</code>. The function returns the Celsius number ending with <code>"C"</code>. For example, if the input number is <code>"212F"</code>, the function returns <code>"100C"</code>. If the number is <code>"0F"</code>, the function returns <code>"-17.77777777777778C"</code>.</p>
-
-<p>The regular expression <code>test</code> checks for any number that ends with <code>F</code>. The number of Fahrenheit degree is accessible to the function through its second parameter, <code>p1</code>. The function sets the Celsius number based on the Fahrenheit degree passed in a string to the <code>f2c()</code> function. <code>f2c()</code> then returns the Celsius number. This function approximates Perl's <code>s///e</code> flag.</p>
-
-<pre class="brush: js notranslate">function f2c(x) {
- function convert(str, p1, offset, s) {
- return ((p1 - 32) * 5/9) + 'C';
- }
- let s = String(x);
- let test = /(-?\d+(?:\.\d*)?)F\b/g;
- return s.replace(test, convert);
-}
-</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-string.prototype.replace', 'String.prototype.replace')}}</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.String.replace")}}</p>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.replaceAll", "String.prototype.replaceAll()")}}</li>
- <li>{{jsxref("String.prototype.match", "String.prototype.match()")}}</li>
- <li>{{jsxref("RegExp.prototype.exec", "RegExp.prototype.exec()")}}</li>
- <li>{{jsxref("RegExp.prototype.test", "RegExp.prototype.test()")}}</li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/slice/index.html b/files/vi/web/javascript/reference/global_objects/string/slice/index.html
deleted file mode 100644
index 002f1be65f..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/slice/index.html
+++ /dev/null
@@ -1,138 +0,0 @@
----
-title: String.prototype.slice()
-slug: Web/JavaScript/Reference/Global_Objects/String/slice
-translation_of: Web/JavaScript/Reference/Global_Objects/String/slice
----
-<div>{{JSRef}}</div>
-
-<p>Phương thức <strong><code>slice()</code></strong> tạo ra một Chuỗi mới từ một phần của Chuỗi hiện tại.</p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><code><var>str</var>.slice(<var>beginSlice</var>[, <var>endSlice</var>])</code></pre>
-
-<h3 id="Các_tham_số">Các tham số</h3>
-
-<dl>
- <dt><code>beginSlice</code></dt>
- <dd>Chỉ số điểm bắt đầu của chuỗi con muốn lấy - bắt đầu từ 0. Nếu tham số này là số âm, thì nó tương đương với việc bạn gán nó bằng <code>"độ dài chuỗi" + beginSlice</code>. Ví dụ nếu <code>beginSlice </code>bằng <code>-3</code> thì tương đương với <code>beginSlice</code> bằng <code>"đội dài chuỗi" - 3</code>.</dd>
- <dt><code>endSlice</code></dt>
- <dd>Tham số này không bắt buộc. Nếu có nó sẽ chỉ điểm cuối của chuỗi con muốn lấy. Nếu tham số này âm, nó sẽ được hiểu bằng <code>"đội dài chuỗi" + endSlice</code>. Ví dụ <code>endSlice</code> bằng <code>-3</code> nó sẽ tương đương với <code>"độ dài chuỗi" - 3</code></dd>
-</dl>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p><code>slice()</code> thực hiện lấy một phần chuỗi từ chuỗi ban đầu và trả về một chuỗi mới. Chuỗi ban đầu sẽ không bị thay đổi giá trị.</p>
-
-<p><code>slice()</code> sẽ lấy một phần chuỗi nhưng sẽ không chứa ký tự có chỉ số bằng với tham số endSlice. <code>str.slice(1, 4)</code> sẽ chỉ lấy ba ký tự 1,2 và 3.</p>
-
-<p>Ví dụ khác, <code>str.slice(2, -1)</code> sẽ lấy từ ký tự thứ 3 đến ký tự gần cuối, ký tự cuối không được đưa vào chuỗi mới</p>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Dùng_slice()_để_tạo_chuỗi_mới">Dùng <code>slice()</code> để tạo chuỗi mới</h3>
-
-<p>Ví dụ sau sử dụng <code>slice()</code> để tạo chuỗi mới.</p>
-
-<pre class="brush: js">var str1 = 'The morning is upon us.';
-var str2 = str1.slice(4, -2);
-
-console.log(str2); // OUTPUT: morning is upon u
-</pre>
-
-<h3 id="Dùng_slice()_với_chỉ_số_âm">Dùng <code>slice()</code> với chỉ số âm</h3>
-
-<p>Ví dụ sau sử dụng <code>slice()</code> với chỉ số âm.</p>
-
-<pre class="brush: js">var str = 'The morning is upon us.';
-str.slice(-3); // returns 'us.'
-str.slice(-3, -1); // returns 'us'
-str.slice(0, -1); // returns 'The morning is upon us'
-</pre>
-
-<h2 id="Đặc_tả">Đặc tả</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Đặc tạ</th>
- <th scope="col">Trạng thái</th>
- <th scope="col">Ghi chú</th>
- </tr>
- <tr>
- <td>{{SpecName('ES3')}}</td>
- <td>{{Spec2('ES3')}}</td>
- <td>Initial definition. Implemented in JavaScript 1.2.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.5.4.13', 'String.prototype.slice')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td> </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.slice', 'String.prototype.slice')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Khả_năng_hỗ_trợ_của_các_trình_duyệt">Khả năng hỗ trợ của các trình duyệt</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Tính năng</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Hỗ trợ cơ bản</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Tính năng</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Hỗ trợ cơ bản</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Xem_thêm">Xem thêm</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.substr()")}}</li>
- <li>{{jsxref("String.prototype.substring()")}}</li>
- <li>{{jsxref("Array.prototype.slice()")}}</li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/startswith/index.html b/files/vi/web/javascript/reference/global_objects/string/startswith/index.html
deleted file mode 100644
index 7d3f6bfaa6..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/startswith/index.html
+++ /dev/null
@@ -1,128 +0,0 @@
----
-title: String.prototype.startsWith()
-slug: Web/JavaScript/Reference/Global_Objects/String/startsWith
-translation_of: Web/JavaScript/Reference/Global_Objects/String/startsWith
----
-<div>{{JSRef}}</div>
-
-<p><strong><code>startsWith()</code></strong> method xác định liệu một chuỗi bắt đầu với các chữ cái của chuỗi khác hay không, trả về giá trị true hoặc false tương ứng.</p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><code><var>str</var>.startsWith(<var>searchString</var>[, <var>position</var>])</code></pre>
-
-<h3 id="Tham_số">Tham số</h3>
-
-<dl>
- <dt><code>searchString</code></dt>
- <dd>Các ký tự cần tìm kiếm tại vị trí bắt đầu của chuỗi này.</dd>
- <dt><code>position</code></dt>
- <dd>Tùy chọn. Vị trí trong chuỗi bắt đầu tìm kiếm cho <code>searchString;</code> mặc định là 0.</dd>
-</dl>
-
-<h2 id="Miêu_tả">Miêu tả</h2>
-
-<p>Method này cho phép bạn xác định liệu một chuỗi có bắt đầu với chuỗi khác không.</p>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Cách_sử_dụng_startsWith()">Cách sử dụng <code>startsWith()</code></h3>
-
-<pre class="brush: js">var str = 'To be, or not to be, that is the question.';
-
-console.log(str.startsWith('To be')); // true
-console.log(str.startsWith('not to be')); // false
-console.log(str.startsWith('not to be', 10)); // true
-</pre>
-
-<h2 id="Polyfill">Polyfill</h2>
-
-<p>Method này đã được thêm vào chỉ dẫn kỹ thuật ECMAScript 6 và có thể chưa có sẵn trong tất cả JavaScript implementations. Tuy nhiên, bạn có thể polyfill String.prototype.startWith() với snippet sau:</p>
-
-<pre class="brush: js">if (!String.prototype.startsWith) {
-  String.prototype.startsWith = function(searchString, position) {
-    position = position || 0;
-    return this.indexOf(searchString, position) === position;
-  };
-}
-</pre>
-
-<p>Polyfill mạnh và được tối ưu hơn có sẵn <a href="https://github.com/mathiasbynens/String.prototype.startsWith">trên GitHub bởi Mathias Bynens</a>.</p>
-
-<h2 id="Hướng_dẫn_kỹ_thuật">Hướng dẫn kỹ thuật</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.startswith', 'String.prototype.startsWith')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Initial definition.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Khả_năng_tương_thích_với_Browser">Khả năng tương thích với Browser</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatChrome("41")}}</td>
- <td>{{CompatGeckoDesktop("17")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome("41")}}</td>
- <td>{{CompatSafari("9")}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome("36")}}</td>
- <td>{{CompatGeckoMobile("17")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Xem_thêm">Xem thêm</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.endsWith()")}} {{experimental_inline}}</li>
- <li>{{jsxref("String.prototype.includes()")}} {{experimental_inline}}</li>
- <li>{{jsxref("String.prototype.indexOf()")}}</li>
- <li>{{jsxref("String.prototype.lastIndexOf()")}}</li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/substr/index.html b/files/vi/web/javascript/reference/global_objects/string/substr/index.html
deleted file mode 100644
index c7d477fede..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/substr/index.html
+++ /dev/null
@@ -1,121 +0,0 @@
----
-title: String.prototype.substr()
-slug: Web/JavaScript/Reference/Global_Objects/String/substr
-translation_of: Web/JavaScript/Reference/Global_Objects/String/substr
----
-<div>{{JSRef}}</div>
-
-<div>Phương thức <strong><code>substr()</code></strong>trả  về những ký tự trong một chuỗi được xác định bởi vị trí ký tự bắt đầu và số lượng ký tự theo sau đó.</div>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><var>str</var>.substr(<var>start</var>, [<var>length]</var>)</pre>
-
-<h3 id="Các_tham_số">Các tham số</h3>
-
-<dl>
- <dt><code>start (bắt đầu)</code></dt>
- <dd><code>Vị trí chính xác của ký tự bắt đầu. Nếu là một số âm, nó sẽ được xử lý như sau <strong>strLength</strong> - <strong>start </strong>trong đó strLength</code>là chiều dài của chuỗi. Ví dụ, <code>str.substr(-3) </code>sẽ được coi như là<code> str.substr(str.length -3)</code></dd>
- <dt><code>length (độ dài)</code></dt>
- <dd>Số lượng ký tự muốn lấy ra. Nếu tham số này là {{jsxref("undefined")}}, tất cả các ký tự từ vị trí bắt đầu tới kết thúc của chuỗi sẽ được lấy.</dd>
-</dl>
-
-<h3 id="Giá_trị_trả_về">Giá trị trả về</h3>
-
-<p>Một chuỗi mới là phần đã lấy ra từ chuỗi ban đầu. Nếu  <strong>length</strong> là <strong>0</strong> hoặc là một số âm thì trả về một chuỗi rỗng.</p>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p><code>start</code> là chỉ số của ký tự. Chỉ số của ký tự đầu tiên là 0, và chỉ số của ký tự cuối cùng thì nhỏ hơn độ dài của chuỗi là 1. <code>substr()</code> bắt đầu lấy các ký tự tại <code>start</code>  và thu thập <code>length</code> các ký tự( trừ khi nó chấm tới cuối chuỗi trước, trong trường hợp này nó sẽ trả về ít hơn).</p>
-
-<p>Nếu <code>start</code> là số dương và lớn hơn hoặc bằng chiều dài của chuỗi, <code>substr()</code> trả về một chuỗi rỗng.</p>
-
-<p>Nếu <code>start</code> là số âm, <code>substr()</code> coi nó như chỉ là chỉ số của ký tự tính từ cuối chuỗi; chỉ số của ký tự cuối cùng là -1. Nếu  <code>start</code> là số âm và <code>abs(start)</code> lớn hơn chiều dài của chuỗi,<code>substr()</code> coi 0 như là chỉ số bắt đầu.</p>
-
-<p>Chú ý: Việc xử lý giá trị âm của tham số <code>start</code> như ở trên không được Microsoft JScript hỗ trợ.</p>
-
-<p>Nếu <code>length</code> là 0 hoặc âm, <code>substr()</code> trả về một mảng rỗng. Nếu <code>length</code> bị bỏ sót, <code>substr()</code> lấy các ký tự cho tới cuối chuỗi.</p>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Sử_dụng_substr()">Sử dụng <code>substr()</code></h3>
-
-<pre class="brush: js">var str = 'abcdefghij';
-
-console.log('(1, 2): ' + str.substr(1, 2)); // '(1, 2): bc'
-console.log('(-3, 2): ' + str.substr(-3, 2)); // '(-3, 2): hi'
-console.log('(-3): ' + str.substr(-3)); // '(-3): hij'
-console.log('(1): ' + str.substr(1)); // '(1): bcdefghij'
-console.log('(-20, 2): ' + str.substr(-20, 2)); // '(-20, 2): ab'
-console.log('(20, 2): ' + str.substr(20, 2)); // '(20, 2): '
-</pre>
-
-<h2 id="Polyfill">Polyfill</h2>
-
-<p>Microsoft's JScript không hỗ trợ các giá trị âm cho chi số bắt đầu. Nếu bạn mong muốn sử dụng tính năng này, bạn có thể sử dụng đoạn code dưới đây để xử lý bug này:</p>
-
-<pre class="brush: js">// only run when the substr() function is broken
-if ('ab'.substr(-1) != 'b') {
- /**
- * Get the substring of a string
- * @param {integer} start where to start the substring
- * @param {integer} length how many characters to return
- * @return {string}
- */
- String.prototype.substr = function(substr) {
- return function(start, length) {
- // call the original method
- return substr.call(this,
- // did we get a negative start, calculate how much it is from the beginning of the string
- // adjust the start parameter for negative value
- start &lt; 0 ? this.length + start : start,
- length)
- }
- }(String.prototype.substr);
-}
-</pre>
-
-<h2 id="Các_quy_cách">Các quy cách</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Quy cách</th>
- <th scope="col">Tình trạng</th>
- <th scope="col">Ý kiến</th>
- </tr>
- <tr>
- <td>{{SpecName('ES3')}}</td>
- <td>{{Spec2('ES3')}}</td>
- <td>Da dinh nghia trong phu luc B bang Tuong thich (bo sung thong tin). Ap dung trong JavaScript 1.0</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-B.2.3', 'String.prototype.substr')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td>Da dinh nghia trong phu luc B bang Tuong thich (bo sung thong tin). </td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.substr', 'String.prototype.substr')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td>Da dinh nghia trong phu luc B (quy chuan) cho cac tinh nang bo sung cua ECMAScript doi voi cac trinh duyet Web</td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.substr', 'String.prototype.substr')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td>Da dinh nghia trong phu luc B (quy chuan) cho cac tinh nang bo sung cua ECMAScript doi voi cac trinh duyet Web</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Tương_thích_với_trình_duyệt">Tương thích với trình duyệt</h2>
-
-<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("javascript.builtins.String.substr")}}</p>
-
-<h2 id="Tương_tự">Tương tự</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.slice()")}}</li>
- <li>{{jsxref("String.prototype.substring()")}}</li>
-</ul>
diff --git a/files/vi/web/javascript/reference/global_objects/string/substring/index.html b/files/vi/web/javascript/reference/global_objects/string/substring/index.html
deleted file mode 100644
index e53b920581..0000000000
--- a/files/vi/web/javascript/reference/global_objects/string/substring/index.html
+++ /dev/null
@@ -1,195 +0,0 @@
----
-title: String.prototype.substring()
-slug: Web/JavaScript/Reference/Global_Objects/String/substring
-translation_of: Web/JavaScript/Reference/Global_Objects/String/substring
----
-<div>{{JSRef}}</div>
-
-<p><strong><code>substring()</code></strong> phương thức trả về chuỗi con của 1 chuỗi bắt đầu từ vị trí bắt đầu đến vị trí kết thúc, hoặc đến cuối chuỗi nếu không có vị trí kết thúc</p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox notranslate"><code><var>str</var>.substring(<var>indexStart</var>[, <var>indexEnd</var>])</code></pre>
-
-<h3 id="Parameters">Parameters</h3>
-
-<dl>
- <dt><code><var>indexStart</var></code></dt>
- <dd>Một số integer giữa 0 và một số nhỏ hơn độ dài chuỗi, xác định vị trí kí tự đầu tiên trong chuỗi gốc để đưa vào chuỗi con.</dd>
- <dt><code>indexEnd</code></dt>
- <dd>Không bắt buộc. Một số integer giữa 0 và độ dài chuỗi. Chuỗi con không bao gồm ký tự ở vị trí indexEnd.</dd>
-</dl>
-
-<h3 id="Return_value">Return value</h3>
-
-<p>Chuỗi con trả về là chuỗi nằm ở vị trí từ indexStart đến vị trí ( indexEnd - 1 )</p>
-
-<h2 id="Description">Description</h2>
-
-<p><code>substring()</code> lấy ký tự từ vị trí <code>indexStart</code> tới vị trí (nhưng không bao gồm) <code>indexEnd</code>. Đặc biệt:</p>
-
-<ul>
- <li>Nếu <code><var>indexStart bằng</var></code> <code><var>indexEnd</var></code>, <code>substring()</code> trả về 1 chuỗi rỗng.</li>
- <li>Nếu không có <code>indexEnd</code>, <code>substring()</code> sẽ lấy từ vị trí bắt đầu đến cuối chuỗi. <em>(điều này giống với hàm substr()).</em></li>
- <li>Nếu 1 trong 2 giá trị nhỏ hơn 0 hoặc là {{jsxref("NaN")}}, nó sẽ được xử lý như là 0.</li>
- <li>Nếu 1 trong 2 giá trị lớn hơn  <code>stringName.length</code>, nó sẽ được xử lý như là <code>stringName.length</code>.</li>
-</ul>
-
-<p>Nếu <code>indexStart</code> lớn hơn <code>indexEnd</code>, chúng se được đổi chỗ; ví dụ, <code><em>str</em>.substring(1, 0) == <em>str</em>.substring(0, 1)</code>.</p>
-
-<h2 id="Examples">Examples</h2>
-
-<h3 id="Using_substring">Using <code>substring()</code></h3>
-
-<p>The following example uses <code>substring()</code> to display characters from the string <code>'Mozilla'</code>:</p>
-
-<pre class="brush: js notranslate">var anyString = 'Mozilla';
-
-// Displays 'Moz'
-console.log(anyString.substring(0, 3));
-console.log(anyString.substring(3, 0));
-
-// Displays 'lla'
-console.log(anyString.substring(4, 7));
-console.log(anyString.substring(4));
-console.log(anyString.substring(7, 4));
-
-// Displays 'Mozill'
-console.log(anyString.substring(0, 6));
-
-// Displays 'Mozilla'
-console.log(anyString.substring(0, 7));
-console.log(anyString.substring(0, 10));
-</pre>
-
-<h3 id="Using_substring_with_length_property">Using <code>substring()</code> with <code>length</code> property</h3>
-
-<p>The following example uses the <code>substring()</code> method and {{jsxref("String.length", "length")}} property to extract the last characters of a particular string. This method may be easier to remember, given that you don't need to know the starting and ending indices as you would in the above examples.</p>
-
-<pre class="brush: js notranslate">// Displays 'illa' the last 4 characters
-var anyString = 'Mozilla';
-var anyString4 = anyString.substring(anyString.length - 4);
-console.log(anyString4);
-
-// Displays 'zilla' the last 5 characters
-var anyString = 'Mozilla';
-var anyString5 = anyString.substring(anyString.length - 5);
-console.log(anyString5);
-</pre>
-
-<h3 id="Replacing_a_substring_within_a_string">Replacing a substring within a string</h3>
-
-<p>The following example replaces a substring within a string. It will replace both individual characters and substrings. The function call at the end of the example changes the string <code>'Brave New World'</code> into <code>'Brave New Web'</code>.</p>
-
-<pre class="brush: js notranslate">// Replaces oldS with newS in the string fullS
-function replaceString(oldS, newS, fullS) {
- for (var i = 0; i &lt; fullS.length; ++i) {
- if (fullS.substring(i, i + oldS.length) == oldS) {
- fullS = fullS.substring(0, i) + newS + fullS.substring(i + oldS.length, fullS.length);
- }
- }
- return fullS;
-}
-
-replaceString('World', 'Web', 'Brave New World');
-</pre>
-
-<p>Note that this can result in an infinite loop if <code>oldS</code> is itself a substring of <code>newS</code> — for example, if you attempted to replace 'World' with 'OtherWorld' here. A better method for replacing strings is as follows:</p>
-
-<pre class="brush: js notranslate">function replaceString(oldS, newS, fullS) {
- return fullS.split(oldS).join(newS);
-}
-</pre>
-
-<p>The code above serves as an example for substring operations. If you need to replace substrings, most of the time you will want to use {{jsxref("String.prototype.replace()")}}.</p>
-
-<h2 id="Specifications">Specifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- <tr>
- <td>{{SpecName('ES1')}}</td>
- <td>{{Spec2('ES1')}}</td>
- <td>Implemented in JavaScript 1.0.</td>
- </tr>
- <tr>
- <td>{{SpecName('ES5.1', '#sec-15.5.4.15', 'String.prototype.substring')}}</td>
- <td>{{Spec2('ES5.1')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ES6', '#sec-string.prototype.substring', 'String.prototype.substring')}}</td>
- <td>{{Spec2('ES6')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('ESDraft', '#sec-string.prototype.substring', 'String.prototype.substring')}}</td>
- <td>{{Spec2('ESDraft')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="See_also">See also</h2>
-
-<ul>
- <li>{{jsxref("String.prototype.substr()")}}</li>
- <li>{{jsxref("String.prototype.slice()")}}</li>
-</ul>