String Object Revisited

The Code for the output from above

var bigStr = "big";
var smStr = "small";

/* This displays strings with both big and small text. */

document.write("<BR>This is " + bigStr.big() + " text");
document.write("<BR>This is " + smStr.small() + " text<BR>");

/*
The following two strings contain directly embedded HTML tags. They produce exactly the same result as the two method calls above.
*/

document.write("<BR>This is <BIG>big</BIG> text");
document.write("<BR>This is <SMALL>small</SMALL> text<BR>");

/* If your favorite tag does not have a method, just embed it */

document.write("<BR>This is <STRONG>strong</STRONG> text");