Description: A simple Node.js script that delivers a touch of enchantment by displaying a random fairy fact.
β¨ Features
- Reads fairy lore from a
fairyfacts.txtfile. - Chooses a delightful fact at random.
- Prints the magical fact to the console.
βοΈ Setup
-
Prerequisites:
- Node.js installed on your system.
-
Create
fairyfacts.txt:- Fill this file with enchanting fairy facts (one fact per line).
- You can find inspiration online or use your own imagination!
-
Save as
fairyfacts.js:- Copy and paste the provided code into a file and save it as
fairyfacts.js.
- Copy and paste the provided code into a file and save it as
πͺ Usage
-
Open your terminal or command prompt.
-
Navigate to the directory containing
fairyfacts.js -
Execute:
node fairyfacts.jsA whimsical fairy fact will appear!