Skip to content

Challenge Constructing Strings With Variables

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge 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?";
Clone this wiki locally