Kristofer Giltvedt Selbekk
I'm a full stack engineer that just happens to love React, CSS and front end in general
🐷
💥
http://www.nndb.com/people/095/000031002/
http://knowyourmeme.com/memes/obama-rage-face-not-bad
function getName(person) {
return person.name;
}const getName = person => person.name;function sayHello(name) {
if (name === undefined) {
name = 'person';
}
console.log('Hello ' + name + '!');
}const sayHello = (name = 'person') => {
console.log(`Hello ${name}`);
};function getFullName(person) {
var firstName = person.firstName;
var lastName = person.lastName;
return firstName + ' ' + lastName;
}const getFullName = ({ firstName, lastName }) => {
return `${firstName} ${lastName}`;
};var items = [1, 2, 3, 4, 5];
var first = items[0];
var second = items[1];
var third = items[2];const items = [1, 2, 3, 4, 5];
const [first, second, third] = items;function combine(obj, overrides) {
return Object.assign({}, obj, overrides);
}const combine = (original, overrides) => {
return {
...original,
...overrides,
};
};const getAllButOne = obj => {
const { care, ...importantBits };
return importantBits;
};function addFirst(item, list) {
return [item].concat(list);
}const addFirst = (item, list) => ([item, ...list]);const allButFirst = list => {
const [first, ...rest] = list;
return rest;
}class
Template strings
let + const
import + export
iteratorer!
Symbols
generatorer
shorthand object notation
@selbekk
By Kristofer Giltvedt Selbekk
I'm a full stack engineer that just happens to love React, CSS and front end in general