JavaScript JavaScript and the DOM Getting a Handle on the DOM Selecting by Id

Brian Johnson
Brian Johnson
Front End Web Development Techdegree Graduate 18,863 Points

I don't understand what is being asked of me. please help

Not sure how to do this

js/app.js
let button;
let input;


button.addEventListener('click', () => {
  alert(button.value);
});
index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Phrase Sayer</title>
  </head>
  <body>
    <p><input type="text" id="phraseText"></p>
    <p><button id="sayPhrase">Say Phrase</button></p>
    <script src="js/app.js"></script>
  </body>
</html>

1 Answer

it's asking you to set the button to equal the ID sayPhrase
it should be something like let button =...;