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

122
Views
Can someone please explain me this behaviour of code execution? JS

Why is the button appended before even it creates the button ? Is it some kind of async behaviour of DOM API ??

CODE:

see code output

var li = document.createElement('li');
li.appendChild(document.createTextNode("list-item"));
console.log(li,"1")
var del = document.createElement("button");
del.appendChild(document.createTextNode('delete'))
li.appendChild(del)
console.log(li,"2")
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!