Better javascript syntax