Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

convert css unicode to js

I have a couple of emoji unicodes that works well in css:

    content: "\f410"
    content: "\f2d1"

I tries to output it with javascript, but I failed, I will be so grateful for any suggestion you may offer.

console.log('\f410');
console.log('\Uf410');

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It should be console.log('\uf410');, lower case u.

ps: and maybe you also like something like: console.log(String.fromCharCode(parseInt('f410',16))).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading