Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foo = "aaa"
- bar = foo + null
- console.log(foo);
- // aaa
- foo = null
- bar = foo + "aaa"
- console.log(foo);
- // null
- foo = "aaa"
- bar = foo + 5
- console.log(foo);
- // aaa
- foo = 5
- bar = foo + "aaa"
- console.log(foo);
- // 5
- // особенно мне нравится конверсия из int в str:
- // https://stackoverflow.com/questions/5765398/whats-the-best-way-to-convert-a-number-to-a-string-in-javascript
- // я то думал str(5) ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement