0

I have products : offer_id in javascript and am getting value of offer_id dynamically.

Let say I get products : 12345 but now instead of that I want it to be as products : ;12345, than how can this be achieved in javascript.

I have tried :

  1. products : ';'.offer_id
  2. products : ';'."offer_id"
  3. products : ';'.'offer_id'
  4. products : ";".offer_id

But all of my above trials have failed and am getting syntax error for each one of those. I am newbie to Javascript and so would really appreciate any inputs.

1

1 Answer 1

1

In PHP the concatenation character is . but in JavaScript is +

products : ';'+offer_id
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.