Edit in JSFiddle

$.getJSON('https://www.easyprogramming.net/heroes.json', function(data){
	/* console.log(data); */
  $(data).each(function(i, hero){
		alert("always runs");
<!-- Easy jQuery - Learn AJAX - how to use .getJSON() - #14 -->
    Welcome to the 14th Easy jQuery Tutorial, part of <a href="http://www.easyprogramming.net">EasyProgramming.net</a>. This is similar to the $.get() method but it gives you very strict control over what kind of data your web page is expecting, JSON. 

$.getJSON() example:</p>
  $.getJSON(url,data, successCallbacK);
Notice that there is no 'datatype' argument here because type JSON is built in. 
A full example would look something like this:
  $.getJSON(url,data, successCallbacK)
The example is pretty straight forward so let's practice below.

    Let's practice:
<table id="heroesTable">
		<th>Superhero Name</th>
	<tbody id="heroesBody"></tbody>


#heroesTable {
	border: 1px solid #dddddd;
	width: 100%;
    margin-bottom: 20px;