Skip to content

Instantly share code, notes, and snippets.

@carlosvega20
Created October 8, 2018 22:26
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 carlosvega20/28523bf605418ef43dcfd0b4f115c029 to your computer and use it in GitHub Desktop.
Save carlosvega20/28523bf605418ef43dcfd0b4f115c029 to your computer and use it in GitHub Desktop.
Arrow function
myFunc = () => {
var mensaje='hello World!';
console.log(mensaje);
};
//Can be also expressed as:
/*
function myFunc() {
var mensaje='hello World!';
console.log(mensaje);
}
*/
myFunc();
// hello World!
consola = (mensaje) => console.log(mensaje);
consola('hello');
// hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment