Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <script> function carsCount() { for(let i = 1; i <= 5; i++) { alert("Car " + i); } } </script> <input type="button" onclick="carsCount()" value="Cars count"> </body> </html>