-
-
Save MaximSokolov/a473b39c30db90e18e70 to your computer and use it in GitHub Desktop.
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
/* -- Arrow function expression -- */ | |
=> | |
() => | |
x => x * x | |
params => ({foo: bar}) | |
(p1, p2) => { return p1 + p2; } | |
foo = a => {} | |
foo = (p1, p2) =>{} | |
obj.foo = (p1, p2) =>{} | |
/* -- Rest parameter -- */ | |
(...args) => args[0 | |
function(a, b, ...theArgs) {} | |
/* -- ES6 method definitions -- */ | |
{ | |
foo() {}, | |
write("){"){}; | |
} | |
write("){"); | |
/* -- Default parameters -- */ | |
function f (a = _ => _) {} | |
function callSomething(thing = this.something()) { return thing } | |
multiply = (p1, p2=1) => p1 * p2 | |
/* -- Comments -- */ | |
x => /* */ {} | |
x => | |
// abc | |
{} | |
.foo = x => /* */ {} | |
.foo = x => | |
// abc | |
{} | |
function /* */ foo(){} | |
function | |
// abc | |
foo(){} | |
/* -- Other -- */ | |
function(){} | |
function foo(){} | |
function*(){} | |
function* foo(){} | |
async function (){} | |
async function foo(){} | |
foo = function(){} | |
foo = function foo(){} | |
foo = function*(){} | |
foo = function* foo(){} | |
foo = async function(){} | |
foo = async function foo(){} | |
obj.foo = function(){} | |
obj.foo = function foo(){} | |
obj.foo = function*(){} | |
obj.foo = function* foo(){} | |
obj.foo = async function(){} | |
obj.foo = async function foo(){} | |
obj.prototype.foo = function(){} | |
obj.prototype.foo = function foo(){} | |
obj.prototype.foo = function*(){} | |
obj.prototype.foo = function* foo(){} | |
obj.prototype.foo = async function(){} | |
obj.prototype.foo = async function foo(){} | |
foo: function(){} | |
foo: function foo(){} | |
foo: function*(){} | |
foo: function* foo(){} | |
foo: async function (){} | |
foo: async function foo(){} | |
'foo': function(){} | |
'foo': function foo(){} | |
'foo': function*(){} | |
'foo': function* foo(){} | |
'foo': async function (){} | |
'foo': async function foo(){} | |
"foo": function(){} | |
"foo": function foo(){} | |
"foo": function*(){} | |
"foo": function* foo(){} | |
"foo": async function (){} | |
"foo": async function foo(){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment