Skip to content

LeoJavaAI/es6-cheatsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

es6-cheatsheet

A cheatsheet containing ES6 tips, tricks and code snippet examples for your day to day workflow. Contributions are welcome!

var versus let / const

Besides var, we now have access to two new identifiers for storing values - let and const. Unlike var, let and const statements are not hoisted to the top of their enclosing scope.

An example of using var:

var snack = 'Meow Mix';

function getFood(food) {
    if (food) {
        var snack = 'Friskies';
        return snack;
    }
    return snack;
}

getFood(false); // undefined

About

ES6 cheatsheet containing tips, tricks, best practices and code snippets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published