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

138
Views
¿Por qué recibo a NaN como respuesta?

Quiero aplicar la herencia del prototipo, por lo que mi código debería consolar el registro 18, en lugar de eso, está dando NaN

 'use strict'; const Person= function(firstName,birthYear){ this.name=firstName; this.year=birthYear; } const mahir=new Person("mahir",2003); console.log(mahir); // to check if mahir is instance of person console.log(mahir instanceof Person) // prototype inheritance Person.prototype.calcAge=()=>{ console.log (2020-this.year); } mahir.calcAge();
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!