To make text strikethrough using unicode, I have been using this:
function strikeThrough(text) {
return text
.split('')
.map(char => char + '\u0336')
.join('')
}
Reference:
How to do strike through string for javascript
My question is: is there a similar way to do this for Bold and Italic as well, by adding a unicode character in the same manner? I'm trying to avoid an html-based solution. For example:
function boldText(text) {
return text
.split('')
.map(char => char + '????')
.join('')
}
function italicText(text) {
return text
.split('')
.map(char => char + '????')
.join('')
}