Created
April 20, 2014 17:32
-
-
Save xxl007/11119946 to your computer and use it in GitHub Desktop.
Concatenating a String and Another Data Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numValue = 23.45; | |
var total "And the total is " + numValue; // string has "And the total is 23.45" | |
// the javascript engine first converts the other data type's value into a string before concatenating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment