JavaScript to be obfuscated:
(Without the <script></script> tags!)

Obfuscated JavaScript with String.fromCharCode:

Obfuscated JavaScript with String.fromCharCode + Random Value