Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About FrontEndDev

  • Rank
  1. I have been working my way through the book and understood a lot of the concepts up until the Today.js file in Chapter 7. I really cannot get my head around what is going on with the code. I understand that the following occurs: When the window has loaded the event listener will call the init function. The init function will create a variable called today which will store the current date and time for the user. A variable called message will also be created which will generate a string to inform the user of the current time. I am not too sure what setText('output', message); does. It
  2. Thank you for taking the time to reply and post the link to the website. I am afraid it has not really improved my understanding of the properties. I have read part of Chapter 9 which mentions that document.write is undesirable. I presume that innerText and textContent are therefore preferable? I have also stumbled across innerHTML as well which has only confused me further. Am I correct in saying that innerHTML can be used to display text in HTML format which means that it can be modified to be for example, bold, italic, red, etc? Whereas innerText would display the text in Plan Text
  3. Hi all, I have recently purchase Larry Ullman's book, Modern Javascript, and working my way through each of the chapters. I have reached Chapter 6 - Complex Variable Types and have got stuck on page 179. As I work my way through the book I have been making lots of comments in my Javascript files to ensure that I fully understand the purpose of each line of code. However, when it has come to the code with textContent and innerText I have got stuck. For the example which displays today's date and time (page 178) I do not know why the textContent and innerText properties are used.
  • Create New...