The fixed() method can display a string as teletype text.
The fixed() method can display a string as teletype text.
This method returns the string embedded in the <tt> tag, like this:
<tt>string</tt>
string.fixed()
None
A string embedded in the <tt> tag
Display text as teletype text:
var str = "Hello World!"; var result = str.fixed(); console.log(result);