Skip to content

Instantly share code, notes, and snippets.

@jinnyMcKindy
Last active February 7, 2022 08:27
Show Gist options
  • Save jinnyMcKindy/92ec05fdfedacc70bd00e931d14db481 to your computer and use it in GitHub Desktop.
Save jinnyMcKindy/92ec05fdfedacc70bd00e931d14db481 to your computer and use it in GitHub Desktop.
Функциональный пример
function delay(callback) {
setTimeout(() => callback(), 500)
}
function calc(a) {
return (b) => a + b;
}
calc(1)(2)
//3
function pureFunc(a, b) {
return a + b;
}
let c = 1;
function dirtyFunc() {
c = 3;
return Math.random(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment