There is a string

https://site.com/order/external/main.action? 

I add one more line to it.

 shop=123456&transaction=123456&successUrl=http://site.ru/pay/success&failUrl=http://site.ru/pay/error&user=380999999999 

As a result, I get

 https://site.com/order/external/main.action?shop=123456&transaction=123456&…ttp://site.ru/pay/error&failUrl=http://site.ru/pay/error&user=380999999999 

Concatenated no matter how

 str1.concat(str2); 

or

 str1+str2; 

I thought it cuts along the length, made a new variable 2 times longer - print it out entirely.

What is the problem?

  • five
    in fact, the result is correct, just the browser console in which the result is viewed optimizes the output - Grundy

1 answer 1

in fact, the result is correct, just the browser console in which the result is viewed optimizes the output

 var str1 = 'https://site.com/order/external/main.action?'; var str2 = 'shop=123456&transaction=123456&successUrl=http://site.ru/pay/success&failUrl=http://site.ru/pay/error&user=380999999999'; document.write(str1 + str2); console.log(str1 + str2);