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

121
Views
better to select an element and traverse it to find specific offspring children or to assign css class to the children we want to find?

I'm new to frontend and my question is the following: I have a list of items and I want to remove the last item in some conditions. And it seems to me that there are two options: 1. assign the list with a class, so that I can identify the list by JS and get its child and remove. 2. assign those items with a class, so that I can target the item directly and remove. To me the drawback of 1 is we are not able get the item directly and the the drawback of 2 is we will assign class to too many element. I'm not able to find related best practice, can anyone point me what docs I should take a look or which one is better and why? Thanks

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!