| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/VCalazans/JavaScript/master/templateString.js | [Back] [Original] |
const nome = 'Victor'
const concatena = 'Ol' + nome + '!'
//Possibilidade de quebrar linhas
const template = `
Ol
${nome}!`
console.log(concatena, template)
//expresses
console.log(`1 + 1 = ${1 + 1}`)
//Funo incorporada no tamplate
const up = texto => texto.toUpperCase()
console.log(`Ei ... ${up('cuidado')}!`)
| Web Proxy Viewer | New URL | Original Page |