var tab = ['a', 'b', 'c']; tab.forEach(function(el, i) { console.log(el, i); });
If you use jquery events like below:
<!doctype html> <head> <meta charset="utf-8"> <script src="./jquery-1.10.2.js"></script> <script> $(function() { $('#link').click(function(e) { console.log('klik jquery', e); return false; }); });