Jump to content
Larry Ullman's Book Forums

Ch7, P232, Comments


Recommended Posts

 

To create and call your own function:

1. Open today.js in your text editor or IDE.

2. Begin defining a new function:

// This function is used to update the text of an HTML element.

// The function takes two arguments: the element’s ID and the

text message.

function setText(elementId, message) {

‘use strict’;

 

In the book, the '//' is not printed in front of 'text message.'

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...