When you run complex code in the console put it in {...} brackets.