Javascript template literals and Bootstrap 5 labels

Can I use template literals to format text in Bootstrap5 Label controls?

Can you give an example of what you’re trying to do?


let newNumber = (22 + 10) / 2
console.log(`The new number is ${newNumber}.`)
alert(`The new number is ${newNumber}.`)
Label1.value = "The new number is" + newNumber
// Label1.value = `The new number is ${newNumber}`

Is this what you are trying to do?

Label1.value = `The new number is ${newNumber}`;

Yes, that should work. What happens?

Not sure what was wrong, but it is good now. Thanks!