Variable Names Legal and Illegal Flashcards
1
Q
What illegal character is in this statement.
var product cost = 3.45;
A
A space is an illegal character in a variable name.
2
Q
Type the illegal character in this statement.
var P2_a%88$;
A
%
3
Q
Rewrite this using camelCase.
var Nameofband;
A
var nameOfBand;
4
Q
Declare a variable using nothing but all of the legal characters that aren’t alphabet characters or numbers. Don’t repeat any of them.
A
var $_;
or
var _$;