If I have several variables, e.g.
var t1 = "123";
var t2 = null;
var t3 = "456";
And I want to concatenate t1 + t2 + t3, is there a fixed output for such a string or is the result dependent upon different Javascript engines?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will return the same output regardless of browsers. If any, its only the
nullpart that may be different (unlikely)In this case it will be
"123null456"To offset any inconsistencies regarding how a
nullvalue of converted to a string by different browsers, you can use: