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

341
Views
Text not displaye even the condition is true in javascript

I am working with react and I have some data that I want to display according to some conditions. Although the condition is true it seems not to be working.

This is my condition:

<p className="text-gray-800">
  {
     (attributes?.title.trim() === "hair Services" && attributes?.description,
      console.log('attributes',attributes.title),
      console.log('condition->',attributes?.title.trim() === "hair Services")
      console.log('description->',attributes.description),
     )
   }
</p>

console: enter image description here

It shows only empty p:

enter image description here

about 4 years ago · Juan Pablo Isaza
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!