際際滷shows by User: ingkopunyong / http://www.slideshare.net/images/logo.gif 際際滷shows by User: ingkopunyong / 際際滷Share feed for 際際滷shows by User: ingkopunyong https://cdn.slidesharecdn.com/profile-photo-ingkopunyong-48x48.jpg?cb=1523411265 Example 2.6: Concatenation var foo = 'hello'; var bar = 'world'; console.log(foo + ' ' + bar); // 'hello world' Example 2.7: Multiplication and division 2 * 3; 2 / 3; Example 2.8: Incrementing and decrementing var i = 1; var j = ++i; // pre-increment: j equals 2; i equals 2 var k = i++; // post-increment: k equals 2; i equals 3 Operations on Numbers & Strings In JavaScript, numbers and strings will occasionally behave in ways you might not expect. Example 2.9: Addition vs. concatenation var foo = 1; var bar = '2'; console.log(foo + bar); // 12. uh oh Example 2.10: Forcing a string to act as a number var foo = 1; var bar = '2'; // coerce t