How do I print Unicode characters in the console using JavaScript?

JavascriptWeb DevelopmentFront End Technology

Unicode has more than 1,30,000 characters. To print Unicode Characters in console, set the charset in a <meta> tag in the <head> tag −

<meta charset="UTF-8">

Here’s how you can add it −

<script src="myscript.js" charset="utf-8"/>

The above works on Chrome, Opera, and Firefox.

raja
Published on 03-Feb-2018 15:29:03
Advertisements