JavaScript Basic Exercises
This project revisits beginner-level JavaScript tasks to master the basics of the language. Each script tackles a classic programming exercise.
Structure index.html: The main HTML file. To test each exercise, update the <script src=""> to point to the desired script file. Exercises Hello World script_1.js: Displays "Bonjour, monde!" in the console, then asks for your name and greets you. Operations & Loops script_2.js: Calculates the factorial of a number entered by the user. script_3.js: Asks for the number of levels and prints a Mario-style pyramid. Data Analysis script_4.js: Processes a list of entrepreneurs: filters by birth years, lists names, calculates ages, and sorts by last name. script_5.js: Analyzes a book collection: checks rentals, finds most/least rented, finds a specific book, removes one by ID, and sorts alphabetically. Deeper Thinking script_6.js: Translates RNA sequences into amino acids based on a simplified genetic code. script_7.js: Implements a teen-bot that responds differently depending on the user’s input. How to Run Open index.html in your browser. To test different exercises, change the <script src=""> in the HTML to the corresponding script (e.g., script_2.js).
Check each result in the browser console.