In this codecademy.com exercise, I'm supposed to use the each function to iterate over the jQuery variable, adding every key to the list with id jQueryAttributes. I wrote the each function below, but it's not correct. I'm unsure how to add it to the id with jQueryAttributes. Html is below
var jQuery = $;
//iterate over jQuery, adding every key
//to the list with id jQueryAttributes
$.each(jQuery, function(index, value){
$('#'+index).append($('<li></li>').html(value));
});
html
<div id="left">
<h1>$ methods and attributes</h1>
<ul id='jQueryAttributes'>
</ul>
</div>
Update
One thing I forgot to mention. I'm supposed to use the index of the function to assign a different id to each list item.
jQuery = $?#jQueryAttributes