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

376
Views
Python is operator equivalent in JavaScript (for primitives)

Is there a way in JavaScript to check if 2 primitives point to the same memory location, I'm looking for some Python is operator-like solution

Python Code:

1 is 1    # true      # means left and right operands point to the same memory address

JavasScript can do this to, but for objects only, is there a way to do this comparison for primitives?

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

0

U could use the strict equality operator (===)

console.log(1 === 1);
// expected output: true

console.log('hello' === 'hello');
// expected output: true

console.log('1' ===  1);
// expected output: false

console.log(0 === false);
// expected output: false

See more in here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality

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!