Ad
  • Custom User Avatar

    * just means fetch all columns in the table being searched. In this case it is the students table which also has an alias s. Hence why we have SELLECT s.*, which is referring to the alias s, which is the students table and the . says on students give me all the columns. In this case just the * would have worked .

  • Custom User Avatar

    I thought I could refer to a function launchMissile

    You can, and you should.

    but that's obviously not working...

    Not working how?

  • Custom User Avatar

    There's no need to compare with the empty string, since the outer loop will never be entered when str.length is 0 (becase 0 < 0 evaluates to false, the whole loop is skipped)

    The issue with this code is you're returning 'true' before the outer loop has a chance to iterate, so you never compare the second letter with the rest of the string.

    Move 'return true' down one line so it's the last thing that happens in the function and you will pass the tests without your str === ''