mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-23 21:21:27 -05:00
Open source
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Welcome!
|
||||
// These things are comments, they aren't evaluated as Javascript
|
||||
/* This is a comment too */
|
||||
// In this Tutorial, you are going to learn about variables and addition
|
||||
|
||||
var a=5; // We defined a - and set it's value to 5
|
||||
|
||||
b=6; // We set the value of b to 6 - if b wasn't defined, it's defined now
|
||||
|
||||
a=12; // Set set the value of a to 12
|
||||
|
||||
c=a+b; // c is now 12+6 - which is 18
|
||||
|
||||
b=20; // We set the value of b to 20
|
||||
|
||||
game_log(c); // game_log writes whatever you provide into the game's own logs
|
||||
|
||||
alert(c); // alert simply alerts whatever you provide it, try to use game_log whenever you can, it's less intrusive
|
||||
Reference in New Issue
Block a user