# Postman Script Syntax Error - Unexpected token ';'

**URL:** <https://community.postman.com/t/postman-script-syntax-error-unexpected-token/80569>\
**Category:** Help Hub\
**Tags:** pre-request\
**Created:** [May 29, 2025, 7:54am UTC](https://community.postman.com/t/postman-script-syntax-error-unexpected-token/80569 "2025-05-29T07:54:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![research-cosmologi12](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@research-cosmologi12](https://community.postman.com/u/research-cosmologi12)\
**Post date:** [May 29, 2025, 7:54am UTC](https://community.postman.com/t/postman-script-syntax-error-unexpected-token/80569/1 "2025-05-29T07:54:36Z")

</div>

Hello,

Kindly assist - i try running scripts both pre request and post response but am consistenly getting the error “SyntaxError: Unexpected token ‘;’”

Note that i typed the code manually and i have tried numerous others but the error always remains the same.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/5/25c604f37cf48095ce4a541b2474bee0a68ecddb.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [May 29, 2025, 8:09am UTC](https://community.postman.com/t/postman-script-syntax-error-unexpected-token/80569/2 "2025-05-29T08:09:46Z")

</div>

Hey @research-cosmologi12 👋🏻

Welcome to the Postman Community :postman:

Do you have any scripts set at the Folder or Collection level? Are there any test assertions anywhere?

What does it say in the `Test Results`?

It’s difficult to see from that image.

The way I could make this happen, is it you have a `pm.test` statement in the Collection that isn’t closed out correctly. That would show the response body and show an error in the Tests and the Console.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/1/c1b9356353c764183e85c15f0cd6ef1f2022dab0.png)
