Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
What is "this.return" in JavaScript?

While in VS Code, I hit the tab after typing return and the VS Code Intellisense auto-completed "return" to "this.return".

I've never seen this before and cannot find any documentation on it.

Does anybody know if this is actually a thing, or if VS Code possibly lost it's marbles.

Note: the object I was working in does not have any properties or functions called "return".

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Well, an object could have a property called return:

const obj = {
  return: () => { console.log('↩️'); }
};

obj.return();

Were you in the context of a class that had a return property, or maybe its superclass did?

(Honestly it seems more likely VS Code was just being weird.)

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can run console.log("this", this) in most modern browsers this will return the JSON data of this (the variable this refers to the current instance of declared object FYI), and console.log(typeof(this.return)) and it will likely return function (if you get undefined just change it from this.return to return;)

Likely the object either has a property called return that is a function, or something has gone wrong in the autocomplete.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda