DEV Community

Discussion on: What’s your alternative solution? Challenge #6

Collapse
 
westdabestdb profile image
Görkem • Edited
let prod = 1;
[...Array(10).keys()].map(x => {
  ++x;
  prod *= x;
});
console.log(prod);
Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

This takes a very simple problem and either intentionally or unintentionally obfuscates it. Why?