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

127
Views
¿Por qué verdadero == "verdadero" devuelve falso?

Supongamos que tenemos una condición, donde un String "true" se compara con un booleano true . Devuelve false , aunque true == '1' devuelve true . Si haces true == !!"true" , devolverá true , por lo que debería significar que desde el principio "true" era true . ¿Hay alguna lógica específica, que me falta, o simplemente funciona con la representación de cadena de 0 y 1 ?

 console.log(true == 'true')

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Porque "verdadero" se convierte en NaN, mientras que verdadero se convierte en 1. Entonces difieren.

-- Fuente

about 4 years ago · Juan Pablo Isaza Report
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!