Computer >> Computer tutorials >  >> Programming >> Javascript

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


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.