The Hero Boost is a JavaScript program that randomly selects a superhero and displays their powers, an image link, and a fun motivational message for kids.
I built this project to practice JavaScript fundamentals such as functions, arrays, objects, and random number generation. I wanted to create something simple, interactive, and encouraging that combines programming with positive messages for children.
Through this project, I learned how to:
- Create and use JavaScript functions.
- Store data in arrays of objects.
- Select random objects from an array.
- Access object properties.
- Display formatted output using template literals.
- 🎲 Randomly selects a superhero each time the program runs.
- 💪 Displays the hero's powers.
- 🖼️ Provides a link to the hero's image.
- 💬 Displays a motivational message for kids.
- ➕ Easy to expand by adding more heroes and messages.
Your Hero is: Wonder Woman
Your Power: Super strength, agility, combat skills, healing
Image: https://upload.wikimedia.org/...
Your hero spoke: Truth time: You're braver than you think.
- Node.js (optional if running from the terminal)
- Or any web browser with JavaScript support
- Clone this repository:
git clone https://github.com/d-dealmeida/hero-boost.git- Navigate to the project folder:
cd hero-boost- Run the program:
node script.jsAlternatively, you can copy the code into your browser's Developer Console and run it there.
- JavaScript (ES6) – Main programming language.
- Functions – Generate random numbers.
- Arrays – Store superhero data.
- Objects – Organize hero information.
- Template Literals – Format the console output.
Some ideas for future versions include:
- Display hero images on a web page using HTML and CSS.
- Add more superheroes.
- Include multiple motivational messages for each hero.
- Allow users to choose between Marvel and DC heroes.
- Create a graphical user interface (GUI).
- Add sound effects or animations.
This project was created independently as part of my JavaScript learning journey.
This project is licensed under the MIT License.
Feel free to use, modify, and share this project for educational purposes.