+ 1
Does anyone knows how to make a Mad Lib challenge code with JavaScript?
Please guys I really need to see such code if there's anyone with an idea
5 odpowiedzi
+ 1
I know how I'd write it. But, it isn't something I am interested in writing. Use the normal template for the HTML. Setup the CSS to hand the finished product. In the JavaScript, I'd have a few strings stored into an array with full HTML code of your initial MadLib display. Use span tags with a class name to state what gets inserted (adverb, verb, noun, excetera.) Use onclick to let the tagged item to be selected putting up a prompt to enter the replacement.
+ 3
If you post code here, I am willing to make suggestions on how to get it working to finished product, as you find questions or issues.
+ 2
Thanks a lot Mr. Wells!
+ 2
Okay sir! I very much appreciate😁👍
0
With C ++
#include <iostream>
using namespace std;
int main() {
string color, pluralNoun , celebrity;
cout <<"Enter a color";
getline(cin, color);
cout <<"Enter a plural noun";
getline(cin, pluralNoun);
cout <<"Enter a celebrity";
getline(cin, celebrity);
cout << "Roses are" << color << endl;
cout << pluralNoun << " are blue" << endl;
cout << " I love" << celebrity << endl;
return 0;
}