mirror of https://github.com/01-edu/public.git
clarifications
This commit is contained in:
parent
25ab1365f2
commit
d5747ddcf6
|
@ -2,12 +2,8 @@
|
|||
|
||||
### 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
|
||||
|
||||
- [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)
|
||||
|
||||
|
||||
|
|
|
@ -3,17 +3,19 @@
|
|||
### Instructions
|
||||
|
||||
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:
|
||||
- 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
|
||||
- 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:
|
||||
|
||||
- `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
|
||||
|
||||
|
|
Loading…
Reference in New Issue