EN
TypeScript - no-break / non-breaking space in string
0
points
In this very short article, we are going to look at how to insert a no-break (non-breaking) space character to string in TypeScript.
Quick solution: use the following \u00A0 character code.
const text: string = 'a \u00A0\u00A0\u00A0 b'; // U+00A0
console.log(text); // a b
Output:
a b