pi膮tek, 22 lutego 2019

Programming exercise #2 - double every property in object in array.

Hi, today exercise:
You got an array of objects, for example:

let objArr = [{id: 1, name: 'Kamil'},
{id: 2, name: 'Janusz'}, {id: 3, name: 'Mariusz'}];
Create an function, that takes this array and returns the 
same data, every id should be doubled.
You can also just display data in console.log or print fn.
let res = [{name: "Kamil", id: 2},
{name: "Janusz", id: 4},{name: "Mariusz", id: 6}]
Feel free to send your implementation in comments section!

2 komentarze:

  1. Ten komentarz zosta艂 usuni臋ty przez autora.

    OdpowiedzUsu艅
  2. https://gist.github.com/Kamilnaja/fec48e6dbad631112677ea94ce10896c

    OdpowiedzUsu艅