Coder Social home page Coder Social logo

projectstorytime's Introduction

LAB | Text Adventure

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 app.js file and complete all the unfinished code to find out how this story ends.

Requirements

  • Fork this repo
  • Clone this repo
  • Practice JavaScript Basics - datatypes, operators, conditions

Trial 1: Home Sweet Home (Done for your reference)

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

Trial 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

Trial 3: Karen's new friend

Karen says she's made a new friend but Lily doesn't believe her just 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

Trial 4: Lily's investigation

Lily game 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 sweets 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.

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

Output

Trial 5: Haunting discovery

Lily stalks Karen slowly, making sure to not alert her. Suddenly, a gust of wind sends a chilld 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

Trial 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

Challenge 1: Console Karen

Lily's actions had a negative effect of 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 and returns a concatenated string of strategies. Each strategy is seperated by a space.

Output

Inspired by Mysterious Friend - yourstoryclub.com

projectstorytime's People

Contributors

kalvium-program avatar shnekithaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.