Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
What is the difference between event function Object with parameter and without parameter

What is the difference if I pass the parameter to the function of the event or not, because if I do not put it, it will do the same job if I put the parameter Examples

let btn = document.getElementById("btn");
let p = document.getElementById("p");

function draw(x, y) {
    let div = document.createElement("div");
    div.innerText = 'x';
    div.style.position = 'absolute';
    div.style.top = y + 'px';
    div.style.left = x + 'px';
    document.body.append(div);
}

document.body.onclick = funcation(event){
    draw(event.clientX, event.clientY)
}

document.body.onclick = function () {
    console.log(event.clientX, event.clientY)
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!