GithubHelp home page GithubHelp logo

gty3310 / javascript-practice-questions-generator Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 183 KB

JavaScript Practice Questions Generator for App Academy, with help from previous cohorts. Generate one question at a time

Ruby 1.40% HTML 0.38% JavaScript 98.22%

javascript-practice-questions-generator's Introduction

a/A Practice Test Generator

Mallory created this simple CLI practice test generator during her first week at App Academy to help herself and other students prepare for our first assessment. She wanted a way to simulate the actual test rather than just solving practice problems individually. The questions, Jasmine tests, and solutions were largely pulled from exercises we had encountered during the prepwork and first week of class, or contributed by other students. I pulled on her work and refactored it into JavaScript.

All of the practice problems are listed and categorized in list.csv (categories include: recursion, sorting, enumerable, array, string). When you run generator.rb on the command line and provide your desired number of questions from each category, it uses your input and the CSV file to randomly select practice problems. It combines these problems and writes 3 new files inside the repo folder:

  • practice_test.js contains the problems to be solved
  • spec.js combines the specs for the chosen problems into one file for easy testing
  • solutions.js combines the solutions for each problem

How to use this generator

  1. Clone this repo

  2. Navigate to the folder in terminal and run ruby generator.rb

  3. Input your practice test requests (single question name) two_sum

  4. You will now have three new files: practice_test.js, spec.js and solutions.js. Once these files are created, open SpecRunner.html in your browser. If you have not generated these files, the page will not open.

  5. Check your solutions against those in solutions.js.

Note: if you run the generator again in the same folder, it will re-write those three files and erase your previous work. If you wish to save your previous work, you will need to rename the files.

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.