https://github.com/navneetlal/deaf-grandma-js-problem
https://github.com/navneetlal/deaf-grandma-js-problem
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/navneetlal/deaf-grandma-js-problem
- Owner: navneetlal
- License: cc0-1.0
- Created: 2021-03-15T14:28:27.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T00:21:35.000Z (about 2 years ago)
- Last Synced: 2025-03-08T13:03:02.223Z (2 months ago)
- Language: JavaScript
- Size: 387 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deaf Grandma
**Objective:** The objective of this assignment is to talk with Deaf Grandma.
The intent is to use either or all of the following things:
1. Conditionals
2. Looping Constructs
3. Built In String Functions## Storyline
Whatever you say to grandma (whatever you type in), she should respond with **HUH?! SPEAK UP, SONNY!**, unless you shout it (type in all capitals). If you shout, she can hear you (or at least she thinks so) and yells back, **NO, NOT SINCE 1938!** To make your program really believable, have grandma shout a different year each time; maybe any year at random between **1930 and 1950**. You can't stop talking to grandma until you shout **BYE** thrice.
**Hint:** Try to think about what parts of your program should happen over and over again. All of those should be in your while loop.
1. **JavaScript Objects**
2. **Conditonals Statements**## Sample Conversation
> What do you want to say to Grandma!!
> Hi
> HUH?! SPEAK UP, SONNY!
> you are awesome
> HUH?! SPEAK UP, SONNY!
> Can you hear me?
> HUH?! SPEAK UP, SONNY!
> I AM AWESOME
> NO, NOT SINCE 1947
> bye
> HUH?! SPEAK UP, SONNY!
> BYE
> NO, NOT SINCE 1935
> BYE
> NO, NOT SINCE 1948
> BYE
> NO, NOT SINCE 1936## Assignment
You would write the code these three files
1. isUppercase.js
2. getRandomValue.js
3. index.js`prompt-print.js` facilitates you with two important utility functions:
1. `prompt()`: Will prompt the user for the input, so when you say `prompt()`, it would wait for the input from the user and will return you the entered text/
2. `print()`: Would basically print the message on the console## Instructions to Run and Evaluate
```
# Add a new remote to the starter code
git remote add starter https://github.com/navneetlal/deaf-grandma-js-problem# Install all the dependencies
npm install# To lint test your code
npm run lint# To evaluate the solution
npm run test
```