Image description

PROGRAD PROJECT BUILDER | NODE | QUIZ - STAGE - 1 - WORK WITH JSON AND FILE SYSTEM

Learning Goals

In this exercise, you will learn to work with json and file system in node:

  • JSON
  • file system

Getting started

  1. Fork this repo
  2. Clone this repo

Whenever you create a first significant change, you should make your first commit.

  1. Follow these guidelines to add, commit and push changes.

In the end of this document, you will find guidelines on how to submit the exercise.

Instructions

Your task is to store the data in a json file automatically from a node file module.

PROGRESSION 1 | question.js

Create a module called question.js with questions, options and answers.

PROGRESSION 2 | index.js

Your task in this progression is to fetch the data from question.js and append it to question.json. In order to do this use the node file system module. You can use

fs.writeFileSync()

PROGRESSION 3 | UPDATE THE JSON

Your task in this iteration is to update the json data.

PROGRESSION 4 | STRINGIFY THE ORIGINAL DATA

Your task is to stringify the original data and overwrite the original data.

PROGRESSION 5 | VIEW THE JSON

Your task in this iteration is to view the modified JSON data.

Submission

If you didn't add, commit and push the changes you made, this is the last call. 😄

please share your github links with your Mentors. Your Mentor's will check up your work and provide feedback.

Summary

If you managed to do it, good job! 🏆

We are proud of you!

Happy Coding ProGrad ❤️!