Javascript examples for jQuery:Array
show all items in array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> <script type="text/javascript"> $(function(){//from w w w .j ava 2 s.com var field = ['Name Invalid', 'Email Invalid' , 'Phone Invalid' , 'Address Invalid','All Invalid']; var alertStr = ''; $.each(field , function(i) { alertStr += field[i] + '\n' }) console.log(alertStr) }); </script> </head> <body> </body> </html>