how to multiply all elements in a sequence but in each iteration to omit the current element (javascript)?

后端 未结 0 1820
Happy的楠姐
Happy的楠姐 2020-12-11 03:41

Example: If we have array = [1,2,5,10]; output should be [100,50,20,10];

So, in each iteration escape the current element of iteration.

Any ideas?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题