Skip to content

Instantly share code, notes, and snippets.

View olddustysocksunderthecouch's full-sized avatar

Adrian Bunge olddustysocksunderthecouch

View GitHub Profile
var multiply = function(x, y){
return x*y;
};
var x; // x is undefined
var x = 42; // Now x is a Number (or the meaning of life - Hitch Hikers Guide to the Galaxy)
var x = true; // Now x is a Boolean
function callMe(name){
console.log(name);
}
const callMe = function(name){
console.log(name);
}
const callMe = (name) => {
console.log(name);
}
const callMe = () => {
console.log(‘Douglas Adams’);
}
const callMe = name => {
console.log(name);
}
const returnMe = name => {
return name;
}
import someNameOfYourChoice from ‘./path/to/file.js’;