To prepend a string to the beginning of another string in TypeScript, you can use the concatenation operator +
.
index.ts158 chars8 lines
Alternatively, you can use the concat()
method to achieve the same result:
index.ts179 chars8 lines
Both methods will result in the same output: 'Hello world'.
gistlibby LogSnag