' il metodo charCodeAt () ' Il charCodeAt()metodo restituisce l'unicode del carattere in un indice specificato in una stringa: ' Il metodo restituisce un codice UTF-16 (un numero intero compreso tra 0 e 65535). https://www.w3schools.com/js/tryit.asp?filename=tryjs_string_charcodeat <!DOCTYPE html> <html> <body> <p>The charCodeAt() method returns the unicode of the character at a given position in a string:</p> <p id="demo"></p> <script> var str = "HELLO WORLD"; document.getElementById("demo").innerHTML = str.charCodeAt(0); </script> </body> </html> |