0 points

javascript for grabbing attribute from element/use in planner app


dashboard

Sat Oct 24 2020 17:54:17 GMT+0000 (UTC)

Posted by @jlang #javascript

var buttonClickHandler = function (event) {
  // What is `event.target` referencing?
  // TODO: Write your answer here
  var language = event.target.getAttribute('data-language');
 //event target uses get attribute from the 
  // Why is this `if` block in place?
  // TODO: Write your answer here
  if (language) {
    getFeaturedRepos(language);

    repoContainerEl.textContent = '';
  }
};
content_copy Copy