How to use fromCharCode() to create a string from char code in Javascript

Description

fromCharCode() takes one or more character codes and convert them into a string.

Example


console.log(String.fromCharCode(104, 101, 108, 108, 111)); 

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window