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

250
Views
I have a function and I need to know when it will return true and not false

I have this funtion

function riddle (parme) {
  if(parme !== parme) {
    return true;
  }
  return false;
}

when will it return true (I dont know the language)

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

0

There is only a single value in JS which is not equal to itself which is NaN. Rest in all cases, it will print false

To check for NaN equality, You should use isNaN

function riddle(parme) {
  if (parme !== parme) {
    return true;
  }
  return false;
}

console.log(riddle(NaN));

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!