You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
## verydisco-reverso
|
|
|
|
|
|
|
|
### 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
|
|
|
|
|
|
|
|
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)
|
|
|
|
- [`Math.floor()` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)
|
|
|
|
<!--
|
|
|
|
again?
|
|
|
|
- [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)
|
|
|
|
-->
|
|
|
|
|
|
|
|
|