Expected expression after operation


I feel as if I typed in the code verbatim from the book and I keep getting this error. Can anyone identify why?


There is a syntax error on line 27.

var currentQuestionIndex : Int = 0

The ellipsis, three dots, after the var declaration is upsetting the compiler.

After the var declaration, the compiler is trying to parse the following phrase (a range expression):


But the UpperBound is missing, causing the error message you are getting.

To my surprise, although syntactically mis-formed, the following code still compiles without any errors!

var foo : Int = 5


func fooBar() {


Thanks. I guess I was typing in the code a little to literal.