Skip to content

Instantly share code, notes, and snippets.

@Alphadelta14
Created September 10, 2015 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alphadelta14/45f444871f7c86b122b3 to your computer and use it in GitHub Desktop.
Save Alphadelta14/45f444871f7c86b122b3 to your computer and use it in GitHub Desktop.
Babel Transpiler
var myAnonymous = (b, c) => b*c;
function makeSummer(a, b=2, c=3){
return (a) => a+b+c;
}
function listPrinter(...d){
console.log(d);
}
function blockContext(){
var a = 5;
if(1 < 2){
let a = 3;
}
return a;
}
"use strict";
var _temporalUndefined = {};
function _temporalAssertDefined(val, name, undef) { if (val === undef) { throw new ReferenceError(name + " is not defined - temporal dead zone"); } return true; }
var myAnonymous = function myAnonymous(b, c) {
return b * c;
};
function makeSummer(a) {
var a = _temporalUndefined;
var b = _temporalUndefined;
var c = _temporalUndefined;
a = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
b = arguments.length <= 1 || arguments[1] === undefined ? 2 : arguments[1];
c = arguments.length <= 2 || arguments[2] === undefined ? 3 : arguments[2];
return function (a) {
return a + (_temporalAssertDefined(b, "b", _temporalUndefined) && b) + (_temporalAssertDefined(c, "c", _temporalUndefined) && c);
};
}
function listPrinter() {
for (var _len = arguments.length, d = Array(_len), _key = 0; _key < _len; _key++) {
d[_key] = arguments[_key];
}
console.log(d);
}
function blockContext() {
var a = 5;
if (1 < 2) {
var _a = _temporalUndefined;
_a = 3;
}
return a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment