0

Again😂!...my qn is simple

I need a code that gets the products of the elements in r1 or r2 and it should be placed in a1 or a2 respectively Please help me out https://code.sololearn.com/cAH9WgUuPYr7/?ref=app

28th Jan 2021, 2:51 PM
Rachel Witro
Rachel Witro - avatar
1 Respuesta
+ 3
Using reduce method however you can loop over the items as well . var a2=r2.reduce((item,value)=>{ return item*value; }); console.log(a2);
28th Jan 2021, 3:21 PM
Abhay
Abhay - avatar