I just tried to write some little js code piece. I use macs TextEdit (until I choose a better editor). Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body><script type="text/javascript">
console.log(„Hello World!“);
</script>
</body>
</html>
If I try to open that snippet in Safari then I get the message:
[Error] SyntaxError: Invalid character '\u8222' (anonymous function) (index.html, line 6)
In my opinion should line 6 be ok, what is my mistake? Could it be because of TextEdit?
Thanks in advance.
Ok, i could solve the problem. There are two settings which you need to set in TextEdit:
Then it works perfectly.