JavaScript Strings

//from [1] below
const toTitleCase = (str: string) => {
  return str.replace(/\w\S*/g, function (txt: string) {
    return txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase();
  });
};

//string formatting
let soMany = 10;
console.log(`This is ${soMany} times easier!`);

//multi-line string
setMessage(`
  Multi-line
  string
  here.
`);

Articles