| bold() The bold() method is used to display the contents of the given string in a bold face of the chosen font within the document. The font is not specified using this method. The outputted text is treated as though it is encompassed within the opening and closing HTML syntax: stringName.bold() EXAMPLE var boldText = new String("This is in bold face"); document.write(boldText.bold() ) The example shows the creation of a new string called boldText. The document.write statement is then used to write the contents of boldText to the screen utilizing the bold() method to display the text in a bold face of the font chosen within the browser. |