Multiple choice technology programming languages

Which of the following variable declarations are valid. a.y2 b._x c.7x d.this_is_test

  1. a

  2. b

  3. c

  4. d

Reveal answer Fill a bubble to check yourself
A,B,D Correct answer
Explanation

Ruby variables can start with letters or underscores, but not digits. y2 is valid (starts with letter), _x is valid (starts with underscore), this_is_test is valid. 7x is invalid because it starts with a digit.