From 7bc616ff5206dbcf97f88b74f3d29a9d4c0b3a48 Mon Sep 17 00:00:00 2001 From: Regina Alyssa Date: Sat, 27 Jun 2020 02:10:06 +0800 Subject: [PATCH 1/3] Add exercise for madlibs --- practice/exercises/madlibs/index.html | 10 ++++++++++ practice/exercises/madlibs/madlibs.js | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 practice/exercises/madlibs/index.html create mode 100644 practice/exercises/madlibs/madlibs.js diff --git a/practice/exercises/madlibs/index.html b/practice/exercises/madlibs/index.html new file mode 100644 index 0000000..b45e2f5 --- /dev/null +++ b/practice/exercises/madlibs/index.html @@ -0,0 +1,10 @@ + + + + + Mad Libs + + + + + \ No newline at end of file diff --git a/practice/exercises/madlibs/madlibs.js b/practice/exercises/madlibs/madlibs.js new file mode 100644 index 0000000..5740313 --- /dev/null +++ b/practice/exercises/madlibs/madlibs.js @@ -0,0 +1,23 @@ +/* + +MAD LIBS is a "template" game where you ask the user for a list of words to substitute for blanks in a story or phrase. + +1. Choose your mad lib. You can search online or come up with your own story/phrase. +Examples: +"What came first the chicken or the ______?" +"Once upon a time, ______ went to the _______ to _________." + +2. Declare a new variable and ask the user for the value of each blank/missing part in your chosen madlib. + +3. Form a new string substituting the blanks with the values given by the user. (hint: use string concatenation) + +3. Display the result either through logging it to the console or using alert. + +To get a user's input, you may choose to use prompt() as shown below. + +Bonus: If you're already familiar with JavaScript DOM manipulation, you can choose to display the text on the HTML page. + +*/ + + +prompt("Enter a name of a person."); From d62061a74a07a6fc8ba8a98cc22f6579d0c83804 Mon Sep 17 00:00:00 2001 From: Regina Alyssa Esguerra Date: Sat, 27 Jun 2020 02:18:04 +0800 Subject: [PATCH 2/3] Add README.md for Mad Libs --- practice/exercises/madlibs/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 practice/exercises/madlibs/README.md diff --git a/practice/exercises/madlibs/README.md b/practice/exercises/madlibs/README.md new file mode 100644 index 0000000..68f5eca --- /dev/null +++ b/practice/exercises/madlibs/README.md @@ -0,0 +1,20 @@ +# Mad Libs + +Mad Libs is a "template" game where you ask the user for a list of words to substitute for blanks in a story or phrase. + +1. Choose your mad lib. You can search online or come up with your own story/phrase. +Examples: +- "What came first the chicken or the ______?" +- "Once upon a time, ______ went to the _______ to _________." + +2. Declare a new variable and ask the user for the value of each blank/missing part in your chosen madlib. + +3. Form a new string substituting the blanks with the values given by the user. (hint: use string concatenation) + +3. Display the result either through logging it to the console or using alert. + +To get a user's input, you may choose to use `prompt()` as shown below then save it to a variable. + +`let name = prompt("Enter a name.")` + +Bonus: If you're already familiar with JavaScript DOM manipulation, you can choose to display the text on the HTML page. From b3544845a4082436fd7ed502c228b73d3a3dc94f Mon Sep 17 00:00:00 2001 From: Regina Alyssa Date: Wed, 1 Jul 2020 19:32:57 +0800 Subject: [PATCH 3/3] Update vue css --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index da35074..9bc1ab2 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - +