December 2001
Intermediate to advanced
480 pages
9h 22m
English
Only a single standard method object is available at this time for functions. Several other browser-specific methods are available but, as noted previously, this book focuses primarily on those that can be used with any browser. The method converts the output of a function to a string using the toString() method. It can be added to any function object. This format changes all numeric or Boolean values to strings:
functionName.toString() The following script provides an illustrative example of how the method works:
<html>
<head>
<title>Illustrating toString()</title>
<script language="JavaScript">
function alpha() { var hope = 12; var charity = 10; return hope > charity; } function beta() { var now = 57; var then = 3; ...Read now
Unlock full access