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

295
Views
cuantas propiedades tiene el objeto?

no entiendo porque no me estaria corriendo bien este ejercicio:

Implementar la función countProps: a partir de un objeto en el cual cada propiedad puede contener cualquier tipo de dato, determinar la cantidad de propiedades de objetos en cualquier nivel, ya sea el inicial u objetos anidados

var countProps = function(obj) {
// Tu código aca:
var total = 0;
for (const key in obj) {
    if (typeof key === "object") {
        countProps(key);
    }
    else total++;
}
return total;

}

lo que estaria fallando es que no me cuenta las propiedades de objetos anidados

about 4 years ago · Santiago Gelvez
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!