Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function expression assigned to the variable madLib that takes five parameters: 1. adjective-A string adjective. Ex: lazy 2. adverb-A string adverb. Ex: quietly'
Write a function expression assigned to the variable madLib that takes five parameters: 1. adjective-A string adjective. Ex: "lazy 2. adverb-A string adverb. Ex: "quietly' 3. noun1-A string noun. Ex: "dog 4. noun2-A string noun. Ex: "moon 5. verb-A string verb. Ex: "smashed The function should return a mad lib string value by substituting the parameter values into the following template The adjective nounl adverb verb the noun2 1 /The lazy dog quietly smashed the moon. 2 //console.logCmadLibC"lazy","quietly", "dog""moon", "smashed")); Run JavaScript Reset code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started