Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About sid9000k

  • Rank
  1. Dear Larry, On page 114 you introduced the indexOf() and lastIndexOf() method. At the bottom of the page you defined the variable fullName as 'Larry Ullman' then gave the following examples: var fullName = 'Larry Ullman'; fullName.indexOf('a'); // 1 ( I understand this one) fullName.lastIndexOf('a'); // 10 (I do not understand why you get 10?) I don't understand why it is 10? Shouldn't it be 1? If the search is backward, shouldn't it be 1? Also, since the string 'Larry Ullman' has two a's, does that mean that the lastIndexOf() method will give only the value of the
  • Create New...