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

238
Views
How JavaSCript '+' operator work with string and number?

How am I getting 339 as output of the following code ?

console.log(3 + '4' + 5 - 6)

can anyone please explain me?

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

0

3 + "4" yields "34" due to the implicit string conversion. Implicit string conversion seems to have higher priority than implicit number conversion.

"34" + 5 yields "345"

"345" - 6 yields 339 due to the implicit number conversion

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!