Last active
April 14, 2018 09:39
-
-
Save sighmin/3dae4b7b58dce62fc3cb1ad3ae89d10e to your computer and use it in GitHub Desktop.
Article snippet for https://www.simonvandyk.co.za/writes/2018/4/14/developers-play-is-a-validated-activity-for-learning
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
# More ridiculousness here: https://github.com/chancancode/javascript | |
require "javascript" | |
puts "This is totally Ruby" | |
javascript { | |
console.log("ZOMG JavaScript"); | |
var a = 1; | |
console.log(a); | |
var b = function(x) { | |
console.log(x + 1); | |
}; | |
b(3); | |
function inspectArguments() { | |
var args = Array.prototype.join.call(arguments, ", "); | |
console.log("Arguments: " + args); | |
} | |
inspectArguments("a", "b", "c"); | |
inspectArguments(1, 2, 3, 4, 5); | |
} | |
puts "This is Ruby again" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment