Computer >> Computer tutorials >  >> Programming >> Javascript

How to convert Unicode values to characters in JavaScript?


To convert Unicode values to characters in JavaScript, use the fromCharCode() string method.

Example

You can try to run the following code to convert Unicode to character −

<!DOCTYPE html>
<html>
   <body>
      <script>
         var a = String.fromCharCode(72);
         document.write("Character: "+a);
      </script>
   </body>
</html>