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

128
Views
Plus Concatenation String operator in JavaScript

I came across the scenario trying with different operating concatenations. I am wondering how this condition was working for the 2nd statement.

  1. console.log("10"+9); // 109

  2. Console.log("10"-9); //1

Can Someone tell me what's happening here?

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

0

+ is used for both string concatenation and addition. If either operand is a string, concatenation is used. - is only used for subtraction, both operants are always coerced to numbers.

about 4 years ago · Juan Pablo Isaza Report

0

The plus sign is both an Arithmetic operator and the String Concatenation operator. The concatenation has precedence.

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!