From de5c456ebded0e038adbf23db34cc290c8829180 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:49:24 +0100 Subject: unslug pl: move --- .../reference/global_objects/string/sub/index.html | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 files/pl/web/javascript/reference/global_objects/string/sub/index.html (limited to 'files/pl/web/javascript/reference/global_objects/string/sub') diff --git a/files/pl/web/javascript/reference/global_objects/string/sub/index.html b/files/pl/web/javascript/reference/global_objects/string/sub/index.html new file mode 100644 index 0000000000..4c36c53a39 --- /dev/null +++ b/files/pl/web/javascript/reference/global_objects/string/sub/index.html @@ -0,0 +1,44 @@ +--- +title: String.prototype.sub() +slug: Web/JavaScript/Referencje/Obiekty/String/sub +tags: + - JavaScript + - Method + - Prototype + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/sub +--- +

{{JSRef}}{{deprecated_header}}

+ +

Podsumowanie

+ +

Powoduje, iż łańcuch zostanie wyświetlony jako indeks dolny tak jakby był wewnątrz znacznika {{HTMLElement("sub")}}.

+ +

Składnia

+ +
str.sub()
+ +

Opis

+ +

The sub() method embeds a string in a <sub> tag: "<sub>str</sub>".

+ +

Przykłady

+ +

Przykład: Zastosowanie metod sub() i sup()

+ +

Następujący przykład stosuje metody sub() i {{jsxref("String.prototype.sup()", "sup()")}} do formatowania łańcucha znaków:

+ +
var superText="superscript";
+var subText="subscript";
+
+console.log("This is what a " + superText.sup() + " looks like.");
+// This is what a <sup>superscript</sup> looks like
+
+console.log("This is what a " + subText.sub() + " looks like.");
+// This is what a <sub>subscript</sub> looks like.
+ +

Zobacz także

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