Be careful with syntax

Make sure you’re awake for this one. With the introduction of the new concept, you might get stuck on syntax here. I sure did. There’s reassembly of our code and the video seems to have undergone some adjustment. At 5:15 of the video, a semicolon even disappears just as he’s talking about placing it. It’s a detail I wouldn’t have noticed except that my syntax was already wrong and I was doubling back through. I’m still not totally clear why we’d define the function outside the character class.

Ultimately for me, VS Code was insisting I had a syntax flaw even after I’d fixed it. Restarting the software fixed things up after some irritation pouring back through code that wasn’t wrong. Did you know you can scroll the wheel while dragging to move a chunk rapidly through code, hold ctrl to copy the dragged bit, or use alt+up/down arrow to slide stuff up or down? Hopefully, some of this helps you proceed.

1 Like

Privacy & Terms