• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

SyntaxError: Invalid or unexpected token when use javascript code

Status
Not open for further replies.

ArshilAhmad

Moderator
Staff member
Hey @tisaigon,

I tried running your code using Code by Pabbly: Run JavaScript (Beta), and it returned a correct response. I recommend that you try running the code again on your end and let us know of any issues.

1682663273915.png
 

tisaigon

Member
hi, my code is very simple.
CAn i define variable like screenshot?
Let X = output of pre step?
thank you
 

ArshilAhmad

Moderator
Staff member
@tisaigon, The code you are running contains an error. We have fixed the code by adding double quotes to it, and you can do the same on your end. Yes, you can define the variable like you did in the screenshot.
Please note that Code by Pabbly requires proficient skills. We kindly request that you test your code on a compiler to ensure it is functioning correctly. If you are unable to resolve any issues, we suggest seeking the help of a developer. Unfortunately, we will not be able to assist you further with fixing your code.

Please feel free to contact us if you have any other questions. Thank you.
image (6).png
 

tisaigon

Member
Sorry @ArshilAhmad
in your above code, let mediacontent = string, and different with my code
let mediacontent = variable from output of last Step
Same error when i add quote before and after :
let mediacontent ='2. Fields 1 Values 0 Value :ab de test test 4 5';
return {id:2333};
Thank you
My workflow:
 

Attachments

  • shot_230428_192428.png
    shot_230428_192428.png
    35.7 KB · Views: 156
  • shot_230428_192554.png
    shot_230428_192554.png
    37.2 KB · Views: 145
Status
Not open for further replies.
Top