is this considered a completely function based program ? function CreateAccount(name, accountNumber, password) { this.name = name; this.accountNumber = accountNumber; th...
const typeOF = val => { val === null && console.log("null"); Array.isArray(val) && console.log("array/object"); if (val !== null) { const x = val.toString(...
const thr = msg => { throw new Error(msg); }; const Account = (name, accountNubmer, password) => ({ name, accountNubmer, balance: 0, password }); ...
rl.question("Login~1\nRegister~2 \n", answer => { answer === "1" ? console.log("login") ...
function foo(fn) { //accepts a callback function return function(args) { // returns a function with argument of args return fn(args) //call the callback function and pas...
function bar(fn) { console.log(fn, ":") fn([2, 2]); } function spreadArgumets(fn) { return function spreadFn(argsArr){ return fn(...argsArr) } } bar(spreadArgumet...
function foo(x, y) { console.log(x, y); } function bar(fn) { fn([1, 2]); } function spread(fn) { return function(arr) { fn(...arr); } } bar( spread(foo) ) last que...
be honest here do these fucking frameworks switch all the time? like angular then vue now its ramda?
this is currying ? function add(x) { return y => x + y; }
hey bud can you help me solve this puzzle ? var run3 = function(f, g, h) { return function(x) { return f(g(h(x))); }; };
any good free translator api ?
so var is global, and let is block scoped?
const foo = () => bar(msg => msg.toUpperCase()); const bar = func => func("AM I FP ENOUGH NOW ?");
i still didnt get his question, did he want to pull user input from a input field or ?
account.password === pass ? { ...account, balance: balance + amount } : thr("Wrong password"); ^ ReferenceError: balance...
any one read the functional programing in javascript book ? any feedback
if(x>y){ console.log('true') } else { console.log('false') } //// x > y ? console.log("true") : console.log("false")
does a function exectute the arguments first before executing itself ?
wanted to ask Robby do you think node.js will die out?
так каллбек в себя что-то будет принимать?