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

139
Views
cant get the calculator buttons to load
function createCalculatorButtons(){
const buttons_row =  6;
let added_buttons= 0;

calculator_buttons.forEach(button =>{
    if(added_buttons % buttons_row == 0){
     input_element.innerHTML += '<div class="row"></div>';
    }
    const row = document.querySelector(".row:last-child");
    row.innerHTML += '<button id = "${button.name}">${button.symbol}</button>';
    added_buttons++;                
})

the buttons are there but with the msg ${button.symbol} instead of the actual symbol

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

0

Tried to leave this in a comment, but couldn't figure out how to get backticks to show....

When using template literals, use the backtick, not a single/double quote.

function createCalculatorButtons(){
  ...
  row.innerHTML += `<button id = "${button.name}">${button.symbol}</button>`;
    ...             
})
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!