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

203
Vistas
Declaration of functions in JavaScript as constants

Why do we use "const" declarator in declaration of functions in Javascript?


     const functionName= () => {
           ...
        }

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

0

const functionName = () => {
       return 15;
    }

Here an anonymous(lambda) function's result is assigning to a constant variable 'functionName'. Just like const x = 5;

Lambda functions are used when you need a function for a short period of time. It has no function name. This is commonly used when you want to pass a function as an argument to higher-order functions, that is, functions that take other functions as their arguments.

about 4 years ago · Juan Pablo Isaza Denunciar

0

// Function declaration
function add(){
}
// A variable declared
const add=()=>{
}

Function promotion occurs in function declarations,Variable declarations are not promoted

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