Skip to content

Instantly share code, notes, and snippets.

@jjhoncv
Created June 21, 2018 22:41
Show Gist options
  • Save jjhoncv/eecac736f161aaa65c2703c0dfd61dfe to your computer and use it in GitHub Desktop.
Save jjhoncv/eecac736f161aaa65c2703c0dfd61dfe to your computer and use it in GitHub Desktop.
description ECMAScript 2015 (ES6) javascript

Description ECMAScript 2015 (ES6) javascript

Arrow functions ()=>

  • Son funciones anonimas.
  • No asocian sus propios this, arguments, super
  • No se relacionan con metodos.
  • No pueden ser usadas en constructores.
var fruits = [
 'apple',
 'orange'
]
console.log(fruits.map(fruit => fruit.length));
// output: Array [5, 6]

Sintaxis basica.

(param1, param2, ..., paramN) => { sentencias }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment