Create NPM Package like a pro
Learn the fundamentals of building and managing NPM packages from scratch.
Find out moreWhenever you invoke fromCodePoint(), the method returns the string representation of its Unicode code point arguments.
fromCodePoint()
MethodfromCodePoint()
accepts one or more arguments. Here is the syntax:
String.fromCodePoint(codepoint1, codepoint2, ..., codepointX)
The codepoint
arguments represent the Unicode codepoints you wish to convert to string.
Below are examples of the fromCodePoint()
method.
String.fromCodePoint(73);
// The invocation above will return: "I"
The snippet above returned the string representation of Unicode code point 73
.
String.fromCodePoint(73, 32, 128150);
// The invocation above will return: "I 💖"
The snippet above returned the string representation of Unicode code points 73
, 32
, and 128150
.
String.fromCodePoint( 73, 32, 128150, 32, 67, 111, 100, 101, 83, 119, 101, 101, 116, 108, 121, 33);
// The invocation above will return:// "I 💖 CodeSweetly!"
The snippet above returned the string representation of fromCodePoint()
’s arguments.