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

248
Views
¿Cómo obtener la longitud del objeto en javascript puro?

cómo obtener la longitud del objeto en javascript puro en este código

 let myFavGames = { "Trinity Universe": { publisher: "NIS America", price: 40, }, "Titan Quest": { publisher: "THQ", bestThree: { one: "Immortal Throne", two: "Ragnarök", three: "Atlantis", }, price: 50, }, YS: { publisher: "Falcom", bestThree: { one: "Oath in Felghana", two: "Ark Of Napishtim", three: "origin", }, price: 40, }, }; // Code One => How To Get Object Length ? let objectLength = ?;
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Puede usar Object.keys() para obtener la cantidad de claves en su objeto:

 const myFavGames = { "Trinity Universe": { publisher: "NIS America", price: 40, }, "Titan Quest": { publisher: "THQ", bestThree: { one: "Immortal Throne", two: "Ragnarök", three: "Atlantis", }, price: 50, }, YS: { publisher: "Falcom", bestThree: { one: "Oath in Felghana", two: "Ark Of Napishtim", three: "origin", }, price: 40, }, }; const objectLength = Object.keys(myFavGames).length; console.log(objectLength); // 3

about 4 years ago · Juan Pablo Isaza Report

0

El método Object.keys() devuelve una matriz de nombres de propiedad enumerables propios de un objeto determinado.

console.log(Object.keys(myFavGames).length);

about 4 years ago · Juan Pablo Isaza Report
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!