JavaScript-Developer-I Exam Question 121

Which function should a developer use to repeatedly execute code at a fixed time interval?
  • JavaScript-Developer-I Exam Question 122

    A developer is creating a simple webpage with a button. When a user clicks this button for the first time, a message is displayed.
    The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
    01 function listen(event) {
    02 alert ( 'Hey! I am John Doe') ;
    03 button.addEventListener ('click', listen);
    Which two code lines make this code work as required?
    Choose 2 answers
  • JavaScript-Developer-I Exam Question 123

    What is the result of the code block?