You can escape the char using \uXXXX x2 (for 32-bit values) format:.
To use UTF-8 strings look into typed arrays and TextEncoder / TextDecoder. They are fairly new so you may need to use polyfill in some browsers.
#Example
document.write('<h1>\uD83C\uDC00</h1>');