How to concatenate this js [closed]

1

??? How to concatenate this js, not to getting error

 success:function(res) {
            secreto = res.lat;
            secreto2= res.lon;
            cidade = res.city;
            Pais  = res.country;

window.location.href = "secreto.php?lat='+secreto+'&long='+secreto2";

}

I can not get it

    
asked by anonymous 13.01.2018 / 22:15

1 answer

2

It's simple, you use OR single quotes OR double quotes:

window.location.href = "secreto.php?lat=" + secreto + "&long=" + secreto2;
                                    
13.01.2018 / 22:36