JavaScript tutorial edit

Deleted some bad syntax and tweaked an explanation for clarity