en.javascript.info/1-js/2-first-steps/8-operators/3-primitive-conversions-questions/task.md
Ilya Kantor cd86e9993b up
2015-08-27 19:59:45 +03:00

26 lines
332 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Type conversions
[importance 5]
Let's recap type conversions in the context of operators.
What will be the result for expressions?
```js
//+ no-beautify
"" + 1 + 0
"" - 1 + 0
true + false
6 / "3"
"2" * "3"
4 + 5 + "px"
"$" + 4 + 5
"4" - 2
"4px" - 2
7 / 0
" -9\n" + 5
" -9\n" - 5
null + 1
undefined + 1
```