Writing the famous package.json file

Report a typo

Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!

The JavaScript code below is used to write the content of an object to a file called package.json. It is run in a node environment. Arrange the code in a way that it could execute well.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                "private": true,
              
                const packageJson = {
              
                "packages/*"
              
                const fs = require('fs');
              
                ]
              
                };
              
                "workspaces": [
              
                fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 4));
              

Create a free account to access the full topic