update snippets 78 - 96

This commit is contained in:
Stefan Feješ
2017-12-25 14:33:49 +01:00
parent 55bc1ec632
commit bc58a5bf54
18 changed files with 86 additions and 39 deletions

View File

@ -7,5 +7,8 @@ Use `fs.writeFile()`, template literals and `JSON.stringify()` to write a `json`
```js
const fs = require('fs');
const JSONToFile = (obj, filename) => fs.writeFile(`${filename}.json`, JSON.stringify(obj, null, 2))
// JSONToFile({test: "is passed"}, 'testJsonFile') -> writes the object to 'testJsonFile.json'
```
```js
JSONToFile({test: "is passed"}, 'testJsonFile') -> writes the object to 'testJsonFile.json'
```