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

177
Views
Why the output is different in javascript?

I have tow var looks like some string. but the output show unicode, and output1 show right charactor. All typeof is string.

        const output = stdout.match(/"dst":"(.*)"/)[1];
        log('xxx=>', output, typeof output);    // xxx=>, \u6536\u5230, string
        const output1 = '\u6536\u5230';
        log('xxx=>', output1, typeof output1); // xxx=>, 收到, string
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

\ characters have special meaning (they are escape sequences) in string literals in JS source code.

They don't have special meaning in external input.

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!