The bold() method is used to display a string in bold. This method returns the string embedded in the <b> tag, like this:
The bold() method is used to display a string in bold. This method returns the string embedded in the <b> tag, like this:
<b>string</b>
string.bold()
None
A string embedded in the <b> tag
Display a text in bold:
var str = "Hello World!"; var result = str.bold(); console.log(result);