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

286
Views
How can I separate the emoji only when the result is correct? JavaScript

How can I separate the emoji only when the result is correct?

A random number that I type will show the same result with emojis. But, I only need the emoji when the result is correct. enter image description here

Only the emoji will appear when the answer is correct.

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

0

looks like a scope issue.

document.getElementById('displayStar').innerHTML =...

should be inside the else condition, now it's showing both message and 'displayStar' regardless the condition because it's outside of the scope, this part of code will run anyway.

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!