# \[error\] SyntaxError: Invalid or unexpected token

**URL:** <https://forum.katalon.com/t/error-syntaxerror-invalid-or-unexpected-token/81122>\
**Category:** Web Testing\
**Tags:** katalon-recorder\
**Created:** [December 1, 2022, 2:23am UTC](https://forum.katalon.com/t/error-syntaxerror-invalid-or-unexpected-token/81122 "2022-12-01T02:23:54Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [December 6, 2022, 3:51am UTC](https://forum.katalon.com/t/error-syntaxerror-invalid-or-unexpected-token/81122/6 "2022-12-06T03:51:21Z")

</div>

Hi,

Thanks @kazurayam to suggest a great point that we should remove `" "` outside `${item}`.

To my point of view, according to this reference: [How to add If else command in recorder - #12 by zoe.lee](http://forum.katalon.com/t/how-to-add-if-else-command-in-recorder/13620/12), `${item}` is right. There should be `${ }` when `item` is a variable.

```auto
${item}=="abcde"

```

should work.

Don’t forget to put `endIf` to end the `if` statement.

Thank you!

---

_[View the full topic](https://forum.katalon.com/t/error-syntaxerror-invalid-or-unexpected-token/81122)._
