Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Programming Quiz: MadLibs (2-11)
- *
- * 1. Declare a madLib variable
- * 2. Use the adjective1, adjective2, and adjective3 variables to set the madLib variable to the message:
- *
- * 'The Intro to JavaScript course is amazing. James and Julia are so fun. I cannot wait to work through the rest of this entertaining content!'
- */
- var adjective1 = 'amazing';
- var adjective2 = 'fun';
- var adjective3 = 'entertaining';
- var madLib = "The Intro to JavaScript course is "
- + adjective1 + ". James and Julia are so "
- + adjective2 + ". I cannot wait to work through the rest of this "
- + adjective3 + " content!";// String Concatenation example
- // An extra example, have the same effect over string using Interpolation
- var madLib = `The Intro to JavaScript course is ${adjective1}. James
- and Julia are so ${adjective2}. I cannot wait to work through
- the rest of this ${adjective3} content!`;// String Interpolation using Template Literals example
Add Comment
Please, Sign In to add comment