Loop through an Array with jQuery foreach

Total Post:1

Points:7
JQuery 
 469  View(s)
Ratings:
Rate this:

I have an array in jquery i want to print these elements using jquery each funtion

$(function () {

    var myArray = ["one", "two", "three", "four", "five"];

});

thanks in advance...

  1. Post:3

    Points:21
    Re: Loop through an Array with jQuery foreach

    try this..

    $(function () {
    
        var myArray = ["one", "two", "three", "four", "five"];
        $.each(myArray, function (index, value) {
            console.log(value);
        });
    });

    hope it helps you..

Answer