Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - Add query string to parameter if value exist in JSON

0 votes
4 views
added Jul 6 in Javascript by LC Marshal First Warrant Officer (11,130 points)
edited 5 days ago by LC Marshal
let status = null; 
      
if(this.actionType === 'buy') {
  status = 1;
  let status1 = window.location.search + `&status=${status}`;
  console.log(status1);
  // window.location.href = status1;
} else if(this.actionType === 'fund') {
  status = 2;
  let status2 = window.location.search + `&status=${status}`;
  console.log(status2);
  // window.location.href = status2;
}

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...