Skip to content

Instantly share code, notes, and snippets.

@sighmin
Last active April 14, 2018 09:39
Show Gist options
  • Save sighmin/3dae4b7b58dce62fc3cb1ad3ae89d10e to your computer and use it in GitHub Desktop.
Save sighmin/3dae4b7b58dce62fc3cb1ad3ae89d10e to your computer and use it in GitHub Desktop.
# 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