JavaScript String strike() Method

Definition and Usage

The String stroke() method in JavaScript is deprecated.

Avoid using it.

It may stop running in your browser at any time.

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

<strike>string</strike>

HTML5 does not support <strike> tag.

Example

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

Try It Yourself

Syntax

string.strike()

Parameters

No parameters.

Return Value

String embedded in <strike> tag.