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

195
Views
La propiedad de la función es diferente de it's this

Recientemente me di cuenta de que no hay diferencia entre estos dos fragmentos.

 function step() { if (!this.counter) this.counter = 0; return this.counter++; } console.log(step()); // -> 0 console.log(step()); // -> 1 console.log(step()); // -> 2
 function step() { if (!this.counter) this.counter = 0; return this.counter++; } step.counter = 10; console.log(step()); // -> 0 console.log(step()); // -> 1 console.log(step()); // -> 2

¿Por qué establecer una propiedad de función no afecta this ?

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!