GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PracticeJavaScript/pjs-problems: Coding problem data for PracticeJavaScript.com

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
problems
problems
 
 
tests
tests
 
 
.babelrc
.babelrc
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
README.md
README.md
 
 
gulpfile.js
gulpfile.js
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

PJS-Problems

Coding problem data for PracticeJavaScript.com

To add to your project

npm i --save pjs-problems

With ES6 template strings

require('pjs-problems');

To dev on it locally

git clone https://github.com/PracticeJavaScript/pjs-problems.git
cd pjs-problems && npm i

Note

It reformats es6 template literals to normal nasty string concat on git push or gulp es5, for compatibility reasons. Test your problems using npm link, and the reformatting shouldn't harm the functionality, it'll just make it look super-ugg.

We'll get some test framework in there soon to allow testing the problems outside of the client app

Example

{
  name: 'Create Array',
  time: 10,
  prompt: 'Create and return an array that contains \'apple\' and \'banana\'',
  given: `const fruits = [];\rreturn fruits;`,
  answer: `const fruits = ['apple', 'banana'];
            return fruits;`,
  tests: [
    {
      name: 'Correct output',
      test: `assert.deepEqual(output, ['apple', 'banana']) === undefined;`
    },
    {
      name: 'Returns an Array',
      test: `assert.isArray(output) === undefined;`
    },
    {
      name: 'Array has 2 items',
      test: `assert.lengthOf(output, 2) === undefined;`
    }
  ]
}

About

Coding problem data for PracticeJavaScript.com

practicejavascript.com/

Topics

gamejavascriptjavascript-gamelearninglearning-by-doinglearning-exercisepractice

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.