Tag: type error vs syntax error in javascript