char is a reserved keyword in javascript