Raveen Kumar

Javascript

Reading Materials

How do you set up a local testing server? - Learn web development | MDN

https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics

document.querySelector("html").addEventListener("click", function () {
  alert("Ouch! Stop poking me!");
});

The function we just passed to addEventListener() here is called an anonymous function, because it doesn’t have a name. There’s an alternative way of writing anonymous functions, which we call an arrow function. An arrow function uses () => instead of function ():

document.querySelector("html").addEventListener("click", () => {
  alert("Ouch! Stop poking me!");
});

#Javascript #Web #Website