Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (7 sloc) 368 Bytes

Constructing Strings with Variables

Sometimes you will need to build a string, Mad Libs style. By using the concatenation operator +, you can insert one or more variables into a string you're building.

Example

var ourName = "Free Code Camp";
var ourStr = "Hello, our name is " + ourName + ", how are you?";
Something went wrong with that request. Please try again.