mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:28 -05:00
Open source
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<p>Using Javascript is as simple as:</p>
|
||||
|
||||
<div class='code trimnl executeb'>
|
||||
a=5;
|
||||
b=7;
|
||||
c=a*b;
|
||||
alert(c);
|
||||
</div>
|
||||
|
||||
<p>As you probably guessed, we used Javascript like a Calculator, the above program alerts "35".</p>
|
||||
|
||||
<p>Some more explanation:</p>
|
||||
|
||||
<div class='code'>
|
||||
a=5; // "a" is now a variable that holds the value 5
|
||||
b=7; // "b" is now a variable that holds the value 7
|
||||
c=a*b; // "c" is a new variable, it's calculated as 5x7 - it's equal to 35, it's the value it's holding now
|
||||
alert(c); // "alert" is a function that makes the browser pop up whatever you put in there, annoyingly, you probably saw them before :)
|
||||
</div>
|
||||
Reference in New Issue
Block a user