Browse Source

clarifications

pull/761/head
Chris 3 years ago committed by Clément
parent
commit
d5747ddcf6
  1. 6
      subjects/verydisco-forever/README.md
  2. 10
      subjects/verydisco/README.md

6
subjects/verydisco-forever/README.md

@ -2,12 +2,8 @@
### Instructions ### Instructions
Create a `verydisco-forever.mjs` script that does exactly the same as you verydisco script, but write the result in a `verydisco-forever.txt` file instead of printing it in the console. Create a `verydisco-forever.mjs` script that does exactly the same as you `verydisco` script, but writes the result in a `verydisco-forever.txt` file instead of printing it in the console.
### Notions ### Notions
- [Node file system: `writeFile`](https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options) - [Node file system: `writeFile`](https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options)
- [Node path: `resolve`](https://nodejs.org/api/path.html#path_path_resolve_paths)
- [Node path: `join`](https://nodejs.org/api/path.html#path_path_join_paths)

10
subjects/verydisco/README.md

@ -3,17 +3,19 @@
### Instructions ### Instructions
Create a `verydisco.mjs` script that : Create a `verydisco.mjs` script that :
- takes 1 argument from the command line
- takes the 1st argument from the command line (after the program name)
- makes it very disco: - makes it very disco:
- cut this argument in 2 (rounded up), - cut each word from this argument in 2 (rounded up),
- re-compose a word by concatenating the chunks in the other order - re-compose a word by concatenating the chunks in the other order
- display the result in console - display the result in console
If the argument passed is a sentence, each word of the sentence must be very disco. If the argument passed is a sentence, each word of the sentence must be "very disco".
For example: For example:
- `discovery` would print `verydisco` (🕺🏼) in console. - `discovery` would print `verydisco` (🕺🏼) in console.
- `Node is awesome` would print `deNo si omeawes` in console. - `Node is awesome` would print `deNo si omeawes` in the console.
### Notions ### Notions

Loading…
Cancel
Save