/typescript/

TypeScript part 18 (template strings)

2017-03-04 17:35:17

TypeScript

const userName:string = "Michał";
const text:string = `Lorem ${userName} Ipsum`;
console.log(text);

JavaScript

var userName = "Michał";
var text = "Lorem " + userName + " Ipsum";
console.log(text);