Project

Coffee Machine (JavaScript)

Challenging
1278 completions
~ 6 hours
4.5

This project allows you to get a taste of JavaScript. Practice working with functions, challenge yourself with loops and conditions, and get more experience with JS.

Provided by

JetBrains Academy JetBrains Academy

About

What can be better than a cup of coffee during a break? Two cups. Press a couple of buttons on the machine, and, voilà, a burst of raw energy is in your hands. But first, we should teach the machine how to do it. In this project, you will work on a coffee machine simulator. This machine uses regular ingredients — coffee, milk, and plastic cups. Should it run out of something, it will show you a notification. Our device will serve espresso, cappuccino, and latte. And since nothing is for free, it will also charge coffee lovers for a cup.

Graduate project icon

Graduate project

This project covers the core topics of the Introduction to JavaScript course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Write a program that puts some basic information on the screen. Let the machine describe what it takes to make a cup of coffee!
The machine should calculate how many ingredients it needs to make the required amount of coffee.
Program the machine to calculate how many cups it can make based on the number of set ingredients.
Teach your virtual coffee machine to perform three basic actions: collect the money, replenish the supplies, and serve the coffee.
Program the machine to display how many supplies it has on the screen. Work on the main loop: now, the menu keeps updating until users choose to exit.
Enhance your coffee machine with any new functionality you wish to add.

Reviews

User 618319088 avatar
User 618319088
6 days ago
I have learned and or repeated the switch case method. Repetition is really the mother of knowledge
Dan Murphy avatar
Dan Murphy
2 weeks ago
A nice introduction to writing command-line applications with JavaScript. I worked with numbers, strings, arrays, objects, if and switch statements, while loops, template literals, and functions.
Ris avatar
Ris
5 months ago
The project was great with helping you understanding logic and code structure. It gets you comfortable with loops and conditionals like switch/case. Really nice introduction to JavaScript!

4.5

Learners who completed this project within the Introduction to JavaScript course rated it as follows:
Usefulness
4.6
Fun
4.4
Clarity
4.5