Giter Club home page Giter Club logo

typeofnan-javascript-quizzes's Introduction

TypeOfNaN JavaScript Quizzes

Learn JavaScript fundamentals through fun and challenging quizzes! ๐Ÿ˜ƒ

View the app: ๐Ÿ‘‰ https://quiz.typeofnan.dev

GitHub issues PRs Welcome GitHub forks GitHub stars GitHub license


๐Ÿš€ How to run the app locally

In order to use this app locally, the package manager yarn needs to be installed

If you don't have it installed yet, head over to:

๐Ÿ‘‰ https://yarnpkg.com/en/docs/install

and install the latest yarn version for your system.

1. Clone the repo

๐Ÿ‡ Run this command to clone the repo, it shall install the app locally and change to its directory automatically:

git clone https://github.com/nas5w/typeofnan-javascript-quizzes typeofnan-javascript-quizzes && cd $_

2. Install dependencies

First, before you can use the app, you have to run this command to install all the dependencies:

yarn install

3. Start and view the app ๐Ÿ‘€

After you've installed all the dependencies, run this command to start the app:

yarn start ๐Ÿ‡

Then, in your browser, open http://localhost:8000/ to view it! ๐ŸŽ‰ ๐ŸŽ‰

๐Ÿšง Contributing

I invite you to contribute to this repository! You can do so by opening an issue, or by directly contributing questions.

To directly contribute a quiz question, do the following:

  1. Fork the repository ๐Ÿด
  2. In terminal run yarn install
  3. For creating new question run yarn new-question %your_question_name% (Note %your_question_name% should be lowercased with words separated with dash -)
  4. Open file index.md in directory content/questions/%your_question_name% and fill all fields.

If you have any questions, let me know!

๐Ÿ“‹ About the app

The app was bootstrapped using the gatsby-starter-blog template and then massaging it into a format conducive to quizzing. The app is deployed from master to Netlify.

typeofnan-javascript-quizzes's People

Contributors

advename avatar andrewjthomsen avatar applejax avatar certainperformance avatar ch3rr17 avatar datvidc avatar dependabot[bot] avatar dschau avatar gesposito avatar jackbravo avatar jamesleesaunders avatar jinkim-tech avatar jmoore914 avatar jumpalottahigh avatar kaiguang avatar kyleamathews avatar luandro avatar m-allanson avatar michaelsanford avatar morenomdz avatar mottox2 avatar nas5w avatar nicholasg04 avatar peakercope avatar pieh avatar robinmetral avatar stoozy avatar tonchique avatar vico0tech avatar wowu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typeofnan-javascript-quizzes's Issues

bloated codebase

There is a codebase overwhelm.unnecessary long codes for most of the app files.
This makes it somehow time consuming to understand the code at first-glance.

Describe the solution you'd like
Refactoring is the key to such problem.
Certain operations should be clearly defined and abstracted in their own files(e.g contributors fetch operation and all the inline styling)
the components tree should be well structured with each component abstracted(its logic and styling in one place)

Reduce Object answer should be Order not guaranteed

Describe the bug
The reduce object question:

https://github.com/nas5w/typeofnan-javascript-quizzes/blob/master/content/questions/reduce-object/index.md

Has the correct answer specified as "hello", but the correct correct answer is "Order is not guaranteed".

The code in question uses Object.values which does not use a guaranteed ordering for its result. It uses ordering provided by EnumerateObjectProperties which has a description in the spec stating:

The mechanics and order of enumerating the properties is not specified...

A little more detail about it (calls out Object.keys but they use the same ordering) here:
https://www.reddit.com/r/learnjavascript/comments/d94kuh/sorting_an_object_how_can_i_make_the_10_key/f1eo4ri/

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://quiz.typeofnan.dev/reduce-object/
  2. Click on "Order is not guaranteed"
  3. Click on Submit

Expected behavior
Answer is correct

Questions 34 and 61 have the same title and share localStorage

Describe the bug
Both questions are titled 'Equality and Identity Operators'. They are practically the same. If you answer question 34 and then load question 61, the page would show 'Incorrect' and select the correct answer.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Question 34 'Equality and Identity Operators'
  2. Select an answer and submit
  3. Go to Question 61
  4. The answer would be shown as 'Incorrect' and correct answer will be selected

Expected behavior
No answer should be selected when the page first loads

Merge object-prop-mutation and pass-by-value

https://github.com/nas5w/typeofnan-javascript-quizzes/blob/master/content/questions/object-prop-mutation/index.md

https://github.com/nas5w/typeofnan-javascript-quizzes/blob/master/content/questions/pass-by-value/index.md

object-prop-mutation is a subset of what pass-by-value is testing while pass-by-value is improperly named (there's no actual passing happening).

You can replace object-prop-mutation's content with that in pass-by-value to beef it up. Then you can get rid of pass-by-value or change it to use functions to get some actual passing going on, but there still might be some redundancy between the two (using functions might provide enough separation to not be as noticeable).

fix:No UI wait indicator for a fetch of external resource

Describe the bug
A clear and concise description of what the bug is.

When a fetch for an external resource like GitHub contributors is done,there is nothing to inform the user about the operation if there is a slow of bandwidth or any other delay.The assigned dom element to display the result of this fetch becomes blank even after the delayed fetch.

Expected behavior
an indicator should be put in placed to inform users of pending operation

Screenshots
Oct 16 2019 5_14 PM

@nas5w can i be assigned this

"Order" frontmatter is the same for multiple questions

Describe the bug
The order frontmatter property is the same for several questions.

As an example, pass-by-value and map-letters-to-numbers both have order: 24. I was going to fix the numbers, but it got me thinking: is the order property really necessary? Can the questions be ordered some other way (alphabetically, by date, something else)?

Add more questions!

This app could always benefit from more questions!

Please take a look at the app (https://quiz.typeofnan.dev) for what kind of questions we tend to ask and then check out the Contributing section of the README for instructions on how to contribute a question.

This is a bit of an evergreen issue, so as many people can propose questions in PRs as they want and I'll never close this issue.

This repo is excellent, where can I find similar ones?

I really like this format of quizzes that tests your understanding of the logic. Other quizzes out there are just about memorization and regurgitation of theory concepts.

Please link similar repos/sites below.

Thank you.

Incorrect description of Curly-q

The Curly-q question has the following chunk of code:

const foo = () => {
  return {
    foo: "foo";
  }
}

This code example will result in a syntax error due to ; inside the object.
It is proposed to choose from the following options but in fact, not one of them is suitable.

Either add a new answer (syntax error) or correct the description:

const foo = () => {
  return {
    foo: "foo"
  };
}

The same errors are in the Explanation section.

pass-by-value explanation misleading

https://github.com/nas5w/typeofnan-javascript-quizzes/blob/master/content/questions/pass-by-value/index.md

However, changing the value of a primitive data type such as string (or number, or boolean) does not change the original variable

The kind of value is irrelevant here. Primitive or object, the behavior would be the same.

let b1 = ['Lisa prefers Johnny']; // now an object
let b2 = b1;
b2 = ['Lisa prefers Mark']; // still does not change b1
console.log(b1); // ['Lisa prefers Johnny'];

Instead, the difference is changing the property of an object vs. changing the value of a variable. Changing the property of an object will be seen through other references to that object. Changing the value of a variable does not affect other variables or object properties (with the exception of parameter variables being reflected in the arguments object, but we're going to pretend that's not a thing).

Grammatical fix - Reduce Object question

Describe the bug
In the second bullet point of the explanation, there are three updates which will facilitate reading.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://quiz.typeofnan.dev/reduce-object/
  2. Click on any wrong answer to generate the explanation.
  3. Scroll down to the explanations, bullet point 2.
  4. See error

Expected behavior
There is a grammatical error with a missing period between two sentences. There should be one between "element" and "In".

You've established that any reference to pieces of the code are displayed in code block syntax (I think that's how to describe it). In this bullet point, "agg" and "el" should be displayed as such.

Screenshots

Screenshot from 2019-10-25 13-01-59

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.3 LTS
  • Browser: Chrome
  • Version: 77.0.3865.120

[Incorrect] answer to array method bind

Describe the bug
For the question Array Method Binding, an incorrect answer is set to correct answer.

Expected behavior
The expected output is

1
2
3

And since it is not an option, the right answer should be Something else.

Possible update:
Change the question to:

const reduce = ['a', 'b', 'c'].reduce.bind([1, 2, 3]);
reduce((acc, cur) => acc + cur, '');

The options being:

  • 123
  • abc
  • An error is thrown
  • Something else

poor UI for the clear answer dialogue

a windows dialog pops up when the clear my Answer buton is clicked.This is a probably not the best UI/UX. as shown below.
Screenshots
If applicable, add screenshots to help explain your problem

Oct 16 2019 4_34 PM

a better and possible way is to modalise this feature as shown.
Oct 16 2019 4_38 PM

@nas5w can i be assigned to this issue
.

Set up Gitflow branches

๐ŸŽฏ Goal
GitFlow is a branching model for Git, created by Vincent Driessen. It has attracted a lot of attention because it is very well suited to collaboration and scaling the development team.
GitFlowFeatureBranches

The goal is to create branches to exercise best practices for practicing professional developers.

๐Ÿ’ก Possible solutions
Add these branches--
develop: the first stop for 'features' branch, and features/fixes are branched back in when it's ready for release
features: for new features, or non-emergency bug fixes
release: last stop before merging into 'master' branch, the branch is deployed into a well-defined test environment, tested, and any/all problems are fixed within the release branch
hotfixes: for emergency fixes
master: tracks release code only

Read more about Gitflow here

๐Ÿ“‹ Steps to solve the problem
Generate branches (I've gone ahead and started the develop branch)

Issue format by @Roshanjossey of first-contributions

Happy Hacktoberfest!!

A few issues I encountered. in case you want to make a FAQ or similar.

When installing and attempting to run Yarn install and Yarn start - I encountered a couple of problems, and just wanted to list them here in case you wanted to make a FAQ:

Error: ENOSPC: System limit for number of file watchers reached, watch "FILE LOCATION".
Gatsby error: gatsbyjs/gatsby#11406

VSCODE beautifier conflicts. Project uses Prettier, but apparently if any of your VSCODE extensions have any form of beautifier, this will result in catastrophic formatting.
some extensions only made wrong indentation, however others split tags over several lines. Beautifier is a big no no.

Make README prettier

Hoping someone out there has experience making attractive README files for open source projects. Open to suggestions of things like emojis, badges, new sections, whatever helps make the project more attractive to both use as an app and contribute to.

Add README instructions for running the app locally

The README does not specify how to run the application locally. This would be helpful as contributors would be able to verify their proposed question(s) or functionality changes work as expected. Ideally, this section would have the following content:

  • How to clone the repo
  • How to install dependencies (using yarn)
    • How to install yarn globally if they don't have yarn yet
  • How to start the app and view it

Add a question generator

Anyone up for adding a node-based question generator? Essentially, this should be a node command that you can run, preferably something like:

node new-question queston-route

This should generate a new folder called question-route within the content/questions folder, and generate an index.md file with a reasonable question markdown template.

Reset all answers button

I'd like to make a "Reset all answers" button on the main page.
the button when clicked would re-set all answers back to nothing.

use many in one route question model

This is to propose a feature in which a category of question post as seen in the landing page should have 2 or more further questions.Example,the post number 36(String Methods) questions the user on the use of the indexOf method.But there are more than just that type of method which a string possesses.Atleast another question should be asked which emphasizes on a diferent method(s).
Screenshot from 2019-10-17 19-27-18

@nas5w thanks for assigning me this.I would love to say i am participating for hacktoberfest

this-keyword: answer ambiguous. Can be undefined

Describe the bug

The result of the function in the question can be either window or undefined but the question only accepts window as a correct answer. Here's an example of the same code producing undefined: https://senocular.github.io/tests/function-context/

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://quiz.typeofnan.dev/this-keyword/
  2. Click on undefined
  3. Click on submit

Expected behavior
Answer is correct or question goes into more detail about the environment beyond just being in the browser that explicitly rules out situations where it may be undefined (i.e. strict mode).

Desktop (please complete the following information):

  • OS: Mac
  • Browser chrome
  • Version 78

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.