Search notes:

JavaScript: String.fromCharCode

The static method String.fromCharCode creates a string from one ore more Unicode codepoints.
str = String.fromCharCode(unicodeCodepoint)
str = String.fromCharCode(unicodeCodepoint_1, unicodeCodepoint_2, … unicodeCodepoint_n)
<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>String.fromCharCode</title>

  <script type="text/javascript">
    
    function main() {

      var out = document.getElementById('out');

      out.innerHTML += String.fromCharCode('r'.charCodeAt(0), 
                                           'e'.charCodeAt(0), 
                                           'n'.charCodeAt(0),
                                            0xe9,    // eacute
                                            0x20,    // space
                                            0x263a); // smiley
      
      
    }

  </script>

</head>
<body onload='main()';>
  <div id='out'></div> 

  <a href='../Global-Object/function-properties/escape.html'>Compare with escape.html</a>
</body>
</html>
Github repository about-javascript, path: /objects/String/fromCharCode.html

See also

Compare with escape().
String related methods
Unicode

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758193700, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/JavaScript/code-snippets/objects/String/fromCharCode(81): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78