Beginner Exercises
These exercises are designed to help beginners understand fundamental programming concepts through practical tasks.
console.log(findMax([1, 5, 3, 9, 2])); // 9
Exercise 6: Implement a function `findMax` that takes an array of numbers and returns the maximum value.
For example, if you call `console.log(findMax([10, 20, 30]));`, it should output `30`.
<meta charset="UTF-8">
This meta tag sets the character encoding for the HTML document to UTF-8.
It ensures that special characters are displayed correctly in the browser.
Frequently asked questions
What does it mean to display the result on the screen?
Displaying the result on the screen means printing or outputting the value of a variable, function call, or expression using `console.log()` in JavaScript.
What is Project 2: To-Do List about?
Project 2 involves creating a simple to-do list application where users can add and manage tasks.
What is the task to create a simple to-do list?
The task is to build a basic to-do list that allows adding, removing, and displaying tasks in an organized manner.
How do you add new tasks to the list?
To add new tasks, typically you would use a function like `addTask(taskName)` which updates the internal state of your to-do list application.
▶ Try it live
Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.