Question: In the following script, which line(s) will cause an error(s)?

  1. Line 6 will cause an error because you can't reassign a new value to a variable that has already been set.
  2. Line 7 and 8 will cause an error. Line 7 has whitespace in $will i work and should be $will_i_work. Line 8 cannot start with a number befcause it is a variable.
  3. Line 5 will cause an error because some_string should be someString.
  4. Line 3 and 4 will cause an error because a variable cannot start with an underscore(\_).

Answer: The correct answer of the above question is Option B:Line 7 and 8 will cause an error. Line 7 has whitespace in $will i work and should be $will_i_work. Line 8 cannot start with a number befcause it is a variable.