Skip to content

Instantly share code, notes, and snippets.

View FunctionDJ's full-sized avatar
🏠
Working from home

Function FunctionDJ

🏠
Working from home
View GitHub Profile
@FunctionDJ
FunctionDJ / cloudSettings
Last active June 19, 2021 14:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-06-19T14:00:41.526Z","extensionVersion":"v3.4.3"}
@FunctionDJ
FunctionDJ / swap.js
Created February 7, 2020 18:09
How the swap function works
// We're given this function
x = (y=>y)(y,y=x)
// It assignes something to x
// y => y is an arrow function with implicit return
// implicit return means that the "function body" is just an expression that we return
// We can write y => y like this
y => {
return y;
}
// So we can turn our arrow function to a classic named function like this: