The italics() method is used to display a string in italic.
The italics() method is used to display a string in italic.
This method returns the string embedded in the <i> tag, like this:
<i>string</i>
string.italics()
None
A string embedded in the <i> tag
Display the text in italic:
//display a string in italic. var str = "Hello World!"; var result = str.italics(); console.log(result);//from w ww . j a va 2 s . c o m