Skip to content

Bhargob02/lab-story-time

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image description

ProGrad Lab | Story Time

This is a short story about a girl named Karen and her friend. Run index.html to view the story. You will see that the story is incomplete. On finishing each Trial, a part of the story will be unlocked. Go to the src/app.js file and complete all the unfinished code to find out how this story ends.

What should you do

Fork this repo
Clone this repo
Practice JavaScript Basics - Datatypes, Operators, Conditions

How To Submit

Upon completion, run the following commands:

git add .
git commit -m "ProGrad ID"
git push origin master

And finally, create a pull request so your ProGrad Mentor (PM) can review your work.

Tests

Open the SpecRunner.html file on your browser and start coding to pass the test. Remember to focus on one test at a time and read carefully the instructions to understand what should be done.

Progression 1: Home sweet home

We've got some basic information about Karen's home. Find out the type of each data. Create a function moreAboutHome() which takes address, distanceFromTown, hasNeighbours as arguments and returns all datatypes concatenated in a single variable.

Output

Image description

Progression 2: My name is Karen

Now, we're given some more information about Karen's family. Create a function moreAboutKaren() that takes parents, noOfSiblings, isNuclearFamily as arguments. Check if the arguments passed are of the datatypes String, Number, Boolean respectively and return true/false accordingly.

Output

Image description

Progression 3: Karen's new friend

Karen says she's made a new friend but Lily (Karen's Mom) doesn't believe her yet. create a function doesFriendExist() that takes ageInText, ageInNumber as arguments. It checks which of the given value is NaN and returns the value.

Output

Image description

Progression 4: Lily's investigation

Lily gave Karen some sweets in order to calm her down so she could follow her. Lily has a sweet tooth and couldn't resist the temptation. She ate a lot of them on her way to the river.

  • Lily gave Karen x sweets

  • Karen ate y sweets herself

  • She ate another z sweets every n meters travelled

  • Her friend divided the remaining sweets into 2 parts for each of them.

    Create a function sweetTooth() which takes totalNoOfSweets, sweetsConsumedByKaren, sweetsConsumedInNMeters, metersToTravel as arugments and return number of sweets Karen's friend would have.

    Output

Image description

Progression 5: Haunting discovery

Lily stalks Karen slowly, making sure not to alert her. Suddenly, a gust of wind sends a chill down her spine. She feels the temperature dropping and checks her phone. It displays the temperature in fahrenheit. Create a function convertToCelsius() which takes an argument fahrenheit and returns the temperature in celcius.

Output

Image description

Progression 6: Rising paranoia

Lily starts panicking once she reaches. She feels there's something wrong with her and requires immediate medical attention. She cannot decide what to do next. How to fix this without hurting her child any further. Create a function aDifficultChoice() which takes an argument choice and returns the corresponding choice.

Output

Image description

Progression 7: Console Karen

Lily's actions had a negative effect on Karen and now she's drifted further away. Lily realizes that she must do something immediately to console her daughter. She thinks of a couple of strategies that might help. Create a function consoleKaren() which takes an argument strategies. Concatenate these strategies and returns the string length.

This lab is inspired by Mysterious Friend - yourstoryclub.com

Happy Coding ProGrad ❤️

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%