JavaScript String sub() methode

Definitie en gebruik

De string sub() is in JavaScript afgekeurd.

Avoid using it.

It may stop running in your browser at any time.

sub() The method returns the string embedded in the <sub> tag:

<sub>string</sub>

Example

let text = "Hello World!";
let result = text.sub();

Try it yourself

Syntax

string.sub()

Parameters

No parameters.

Return value

String embedded in the <sub> tag.