Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

concatenate with backticks

const name = 'Gerardo';const surname = 'Fernández';const telephone = '123 123 123';// "Old syntax"const userInfo = 'User info: ' + name + ' ' + surname + ' ' + telephone;// "New syntax"const userInfo = `User info: ${name} ${surname} ${telephone}`;
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #concatenate #backticks
ADD COMMENT
Topic
Name
7+8 =