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

212
Vistas
Lodash startsWith()

How is the last statement true? The string does not start with "b". Could someone explain the position of "1" and why it makes that statement true?

var _ = require('lodash');
var result = _.startsWith('abc', 'b');

console.log(result);

result = _.startsWith('abc', 'b', 1);
console.log(result);
>node tester.js

false

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

0

As the documentation says the third parameter indicates the position to search from. So if you begin at index 1 then the string abc actually starts with b and thus it will return true.

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