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

266
Views
Why is string with dollar sign not working in javascript function?

why doesn't the word apple doesn't appear using function inside function . I tried many times with different words but not working the result is always it is ${fuit}

const firstfunction=(fuit)=>{
    const gettingbrackets='it is   ${fuit}'
    console.log (gettingbrackets)
}
firstfunction('apple')
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have used the wrong quotation marks. You need to use the "backtick" character `` instead of single (or double) quotes ''. For more details please read the docs about Template literals carefully

const firstfunction=(fuit)=>{
    const gettingbrackets=`it is   ${fuit}`
    console.log (gettingbrackets)
}
firstfunction('apple')

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!