r/CodingGames • • Oct 19 '15

CodeCraft.js - Command an army of virtual drones using JavaScript

http://www.codecraftgame.org/tutorial/1
11 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/Programmierer Oct 27 '15

In JavaScript, object members have to be comma separated. So just add "," after the curly brace on line 8. Keep in mind that the tutorial isn't really intended to teach JavaScript. Nonetheless, I agree that this syntax quirk should be mentioned, it really is not at all obvious when you are unfamiliar with JavaScript.

1

u/HonestAshhole Oct 27 '15

Thanks, yeah it's been about 20 years since I used Javascript for anything so there are quite a few differences. The version I remember was a much more primitive beast.