From 2b376b7acc7a6392c26b552595d52bac930c0d7b Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 10 Mar 2021 18:45:52 +0000 Subject: [PATCH] clarifications --- subjects/verydisco-reverso/README.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/subjects/verydisco-reverso/README.md b/subjects/verydisco-reverso/README.md index 5b9d5bc9..6bc48b04 100644 --- a/subjects/verydisco-reverso/README.md +++ b/subjects/verydisco-reverso/README.md @@ -3,22 +3,18 @@ ### Instructions Create a `verydisco-reverso.mjs` script that: -- takes the name of a file (with extension) in argument -- read this file -- discover the content of this file by reversing it from the `very disco` mode -- print the result in console + +- takes the name of a file (with the extension) as a first argument +- reads this file +- deciphers the content of this file by reversing it from the `very disco` mode +- prints the result in the console For example: + - Reading the `verydisco` content of your `verydisco.txt` file would print `discovery` in console. ### Notions -- [Node file system: `readFile`](https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options) +- [Node file system: `readFile`](https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options) +- [try...catch](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) - [`Math.floor()` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor) - - -