• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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: 84
  • shot_230428_192554.png
    shot_230428_192554.png
    37.2 KB · Views: 83
Status
Not open for further replies.
Top