//Sample Solution to script.js
$('document').ready(function() {
//utility method -- by the end of this lesson
//you'll know enought to write it yourself!
function addListItemTo(listId,item) {
$('#'+listId).append($('<li/>').html(item));
}
var jQuery = $;
var jQueryObject = $();
//iterate over jQuery, adding every key to the list with id
//jQueryAttributes using addListItemTo()
//you just need to write the for loop
for (key in jQuery){
addListItemTo("jQueryAttributes",key);
}
//iterate over jQueryObject, adding every key to the list with id
//jQueryObjectAttributes using addListItemTo()
//you just need to write the for loop again\
for (key2 in jQueryObject){
addListItemTo('jQueryObjectAttributes',key2);
}
});
No comments:
Post a Comment