

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to fetch character from Unicode number - JavaScript?
To fetch character from Unicode number, use String.fromCharCode() in JavaScript.
The syntax is as follows −
String.fromCharCode(yourIntegerValue)
Here, yourIntegerValue is the Unicode number.
Example
Following is the code −
var letters = 'ABCDEFGH'; for (var i = 0; i < letters.length; i++) { console.log(letters[i] + "=" + letters.charCodeAt(i)); } var number = 72; console.log(number + " character code is=" + String.fromCharCode(number));
To run the above program, you need to use the following command −
node fileName.js.
Here, my file name is demo265.js.
Output
This will produce the following output on console −
PS C:\Users\Amit\javascript-code> node demo265.js A=65 B=66 C=67 D=68 E=69 F=70 G=71 H=72 72 character code is=H
- Related Questions & Answers
- How to print Unicode character in C++?
- How to return a number indicating the Unicode value of the character?
- Match Unicode character specified by the hexadecimal number XXXX.
- How to convert an integer to a unicode character in Python?
- Check whether the Unicode character is a separator character in C#
- How to find the unicode category for a given character in Java?
- Java Program to determine a Character's Unicode Block
- How to convert Unicode values to characters in JavaScript?
- PHP – How to return character by Unicode code point value using mb_chr()?
- PHP – How to get the Unicode point value of a given character?
- Fetch Numbers with Even Number of Digits JavaScript
- Unicode Byte Order Mark (BOM) character in HTML5 document.
- Fetch alternative even values from a JavaScript array?
- How to create a chart from JSON data using Fetch API in JavaScript?
- Fetch specific values from array of objects in JavaScript?
Advertisements