how to create a boolean variable in javascript code example Example: javascript can a var be a boolean var YES = new Boolean(true);