JSFiddle - React, Tailwind, and code Playground
by mhctoledo
HTML
<p>
prueba: þ
</p>
<p>
prueba: ʃ
</p>
<p>
prueba: ŵ
</p>
<p>
prueba: ẃ
</p>
<p>
prueba: : ː
</p>
<p>
prueba: h
<br>
prueba: <sup>h</sup>
</p>
JavaScript
var a = "h";
//document.write(a.charCodeAt(0));
//document.write("<p>&254;</p>");
function convertToAscii(str) {
var result = '';
var currentChar = '';
var i = 0;
for (; i < str.length; i += 1) {
currentChar = str[i].charCodeAt(0).toString(2);
if (currentChar.length < 8) {
while (8 - currentChar.length) {
currentChar = '0' + currentChar;
}
}
result += currentChar;
}
return result;
}
//document.write(a.codePointAt());