JavaScript String bold()
Example
Display a text in bold:
let text = "Hello World!";
let result = text.bold();
Try it Yourself »
Description
String bold() is deprecated in JavaScript.
Avoid using it.
It may cease to work in your browser at any time.
The bold()
method returns a string embedded in a <b> tag:
<b>string</b>
Syntax
string.bold()
Parameters
NONE |
Return Value
A string embedded in a <b> tag. |
❮ JavaScript String Reference