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

389
Views
why isn't append working in my Javascript

I have been trying to create a budget website I have written most of the code the problem here is that when I am trying to create an append my visual studio code editor detects the code as incorrect giving me these error messages. unterminated string literal. ts(1002), unexpected keyword or identifier. ts(1434), JSX expression must have one parent element. ts(2657) I have in my HTML file an unordered list as the parent element. here is my code. if anyone can help I would appreciate it

HTML

<h3 class="history">History</h3>
<ul class="list">
    <!--<li class="minus">
        Cash <span>-$400</span><button class="delete-btn">x</button>
    </li>-->
</ul>

Javascript

    const item = document.createElement('li');

    //Add class based on values

    item.classList.add(transaction.amount < 0 ? 'minus' : 'plus');

  item.innerHTML = '
  ${transaction.text} <span>${sign}${Math.abs(transaction.amount)}</span> <button class= "delete-btn" onclick= "removeTransaction"(${transaction.id})">x</button>
  ';

P.S. I am using this website to create it https://www.sourcecodeexamples.net/2020/12/expense-tracker-project-with-javascript.html.

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!