aboutsummaryrefslogtreecommitdiff
path: root/files/uk/web/javascript/reference/global_objects/array/tostring
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
commit218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch)
treea9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/uk/web/javascript/reference/global_objects/array/tostring
parent074785cea106179cb3305637055ab0a009ca74f2 (diff)
downloadtranslated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip
initial commit
Diffstat (limited to 'files/uk/web/javascript/reference/global_objects/array/tostring')
-rw-r--r--files/uk/web/javascript/reference/global_objects/array/tostring/index.html80
1 files changed, 80 insertions, 0 deletions
diff --git a/files/uk/web/javascript/reference/global_objects/array/tostring/index.html b/files/uk/web/javascript/reference/global_objects/array/tostring/index.html
new file mode 100644
index 0000000000..53505797f4
--- /dev/null
+++ b/files/uk/web/javascript/reference/global_objects/array/tostring/index.html
@@ -0,0 +1,80 @@
+---
+title: Array.prototype.toString()
+slug: Web/JavaScript/Reference/Global_Objects/Array/toString
+tags:
+ - Array
+ - Масив
+ - метод
+ - прототип
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/toString
+---
+<div>{{JSRef}}</div>
+
+<p>Метод <code><strong>toString()</strong></code> повертає рядкове представлення заданого масиву та його елементів.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-tostring.html")}}</div>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="syntaxbox"><var>arr</var>.toString()</pre>
+
+<h3 id="Значення_що_повертається">Значення, що повертається</h3>
+
+<p>Рядкове представлення елементів масиву.</p>
+
+<h2 id="Опис">Опис</h2>
+
+<p>Об'єкт {{jsxref("Array")}} заміщує метод <code>toString</code> об'єкта {{jsxref("Object")}}. Для об'єктів Array метод <code>toString</code> об'єднує масив та повертає один рядок, що містить усі елементи масиву, розділені комами.</p>
+
+<p>JavaScript викликає метод <code>toString</code> автоматично, коли масив потрібно відобразити у вигляді текстового значення або при посиланні на масив у поєднанні рядків.</p>
+
+<h3 id="Семантика_ECMAScript_5">Семантика ECMAScript 5</h3>
+
+<p>Введений у JavaScript 1.8.5 (Firefox 4) та сумісний з семантикою 5-ї версії ECMAScript, метод <code>toString()</code> є загальним і може використовуватися з будь-яким об'єктом. Буде викликаний метод {{jsxref("Object.prototype.toString()")}}, який поверне значення результату.</p>
+
+<h2 id="Специфікації">Специфікації</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Специфікація</th>
+ <th scope="col">Статус</th>
+ <th scope="col">Коментар</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Початкове визначення. Реалізоване у JavaScript 1.1.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.2', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.tostring', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.tostring', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Сумісність_з_веб-переглядачами">Сумісність з веб-переглядачами</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.toString")}}</p>
+</div>
+
+<h2 id="Див._також">Див. також</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.join()")}}</li>
+ <li>{{jsxref("Object.prototype.toSource()")}}</li>
+</ul>