Alternatively, you can use the “font-size” and “line-height” properties to control the size and spacing of your text, respectively. Here’s an example:
var str = new String("Demo Text"); document.write(str.bold() + "<br />" + str.fontSize(24) + "px" + str.lineHeight(36)); // This will make your text appear in a heavier font weight, with larger text and more spacing between lines alert(str.bold()); // This will popup an alert with your text bolded
You can also use the “text-transform” property to change the case of your text. Here’s an example:
var str = new String("demoText"); document.write(str); // Outputs "demoText" document.write(str.bold()); // Outputs "DEMO TEXT" document.write(str.textTransform("uppercase")); // Outputs "DEMO TEXT"