# unexpected token "xxx"❗️

[JS](../..) ⟩ [error](..) ⟩ [SyntaxError]() ⟩ unexpected token "xxx"

{% hint style="danger" %}
⛔ [<mark style="color:red;">**SyntaxError**</mark>]()：[<mark style="color:yellow;">**unexpected token**</mark> <mark style="color:yellow;">**"xxx"**</mark>](unexpected-token):exclamation:
{% endhint %}

{% tabs %}
{% tab title="💈範例" %}
* replit：[JS is a compiled language](https://replit.com/@pegasusroe/JS-is-a-compiled-language#index.js)

```javascript
var greeting = "Hello";
console.log(greeting);   // ⭐️ this line doesn't have a chance to run❗ 

greeting = ."Hi";        // ⭐️ error occurred in the "tokenizing" stage
//         ↑             //    of compilation❗
//         ↑
// ⛔ SyntaxError: unexpected token .
```
{% endtab %}

{% tab title="✨ 範例" %}
* [return-obj-literal](../../val/func/arrow/return-obj-literal "mention")
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [ydkjs-scope-and-closures-v.2](../../../master/ref/book/you-dont-know-js-series-v.2/ydkjs-scope-and-closures-v.2 "mention") ⟩ [Ch. 1: What's the Scope?](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/scope-closures/ch1.md#chapter-1-whats-the-scope)
{% endtab %}
{% endtabs %}
