Created
June 12, 2012 19:06
-
-
Save darkfrog26/2919468 to your computer and use it in GitHub Desktop.
JavaScript DSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 5; | |
var y = 6; | |
var entries = [1, 2, 3, 4]; | |
var message = 'Testing'; | |
entries[4] = 5; | |
if (x == y) { | |
alert('Hello World!'); | |
} | |
else if (x <= y) { | |
alert(message); | |
} | |
for (x in entries) { | |
alert('Current: ' + x + ' entry'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val x = Variable(5, "x") | |
val y = Variable(6, "y") | |
val entries = Array(List(1, 2, 3, 4), "entries") | |
entries(4) = 5 | |
val message = Variable("Testing", "message") | |
If (x Equals y) { | |
alert("Hello World!") | |
} | |
ElseIf (x <= y) { | |
alert(message) | |
} | |
For (x in entries) { | |
alert(Variable.formatted("Current: %s entry", x)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment