@ManavMisra/

ExaltedClientsideCryptos

Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
const inc = o => ({ ...o, val: o.val + 1 });
const double = o => ({ ...o, val: o.val * 2});

const myObj = {
  val: 2
}

console.log(double(inc(myObj)), myObj);
node v10.16.0