Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

adding a variable to a string without using + in javascript

let a = 5;
let b = 10;
console.log(`The sum of a and b is ${a+b} and the multiplication is ${a*b}`); 
// The sum of a and b is 15 and the multiplication is 50
 
PREVIOUS NEXT
Tagged: #adding #variable #string #javascript
ADD COMMENT
Topic
Name
1+2 =