how to do foreach in javascript? [duplicate]

Hi I want to loop inside my array, how to do it in javascript?
this is my sample array

var myArray = [1,2,3];

my array will be appeared as below

1
2
3

Can you guys help me about it? I really cant get around loop in javascript