# How can I multiply the elements of a list using loops?

{1,1,1,-2,1,2} How acn I multiply the elements in the list using loops?

• The simplest loop would be Fold[Times, {1, 1, 1, -2, 1, 2}] – Bob Hanlon Dec 26 '19 at 17:55

Times @@ {1, 1, 1, -2, 1, 2}

But if you really need a procedural approach use a For loop instead (even if it's probably not a good idea).
t = 1; Do[t *= elem, {elem, {1, 1, 1, -2, 1, 2}}]