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

183
Views
TCS javascript: pregunta técnica escrita

No se cual es la salida de esto y como van los flujos para solucionarlo

 console.log(60+"20" - 20*20);

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

0

JS convierte implícitamente number + string = string

Por lo tanto, 60+"20" = "60"+"20" = "6020"

 let a = "60"+20; console.log(a, typeof a)


Luego, JS convierte implícitamente string - number = number

Por lo tanto, "6020" - 20*20 = "6020" - 400 = 6020-400 = 5620

 let a = "6020" - 20*20; console.log(a, typeof a)

Nota: también puede verificar el tipo de datatype de cada result para mayor claridad de cada resultado después de la conversión

about 4 years ago · Juan Pablo Isaza Report

0

Bueno, se procesa de la siguiente manera:

 60+"20" becomes 6020 20*20 = 400 6020-400 = 5620
about 4 years ago · Juan Pablo Isaza Report

0

output : 5620 20*20 = 400 ->1st 60+'20' = 6020 -> 2nd 6020 - 400 = 5620 -> 3rd
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!