Welcome, all coffee lovers! Haven’t fully clenched your taste buds with coffee? Do you need that little bit of extra caffeine to get you going through the morning or night? Want to be able to go to Starbucks or Dunkin Donuts or any of your favorite coffee shops? You are in the right place with our coffeemaker language here! Ready to recreate Espresso, Macchiato, Americano, Latte, Cappuccino, and the others that come to your mind? After a few minutes in our coffeemaker, you will be able to create and taste your very own coffee! Are you ready to replicate or even surpass the “great” Starbucks? Check out our site here: https://rosettayh.github.io/CoffeeMaker/
- Statically typed language
- Coffee-themed
- Loops
- Classes
- Functions
- Basic Types: int, floats, strings, boolean
- No billian dollar mistake!
Static Type | CoffeeMaker |
---|---|
Numbers (from Javascript) | regular |
Decimals (from Javascript) | decaf |
Strings (from Javascript) | put |
function | cup |
Boolean | boolean |
Javascript | CoffeeMaker |
---|---|
function | cup |
if | sugar |
else if | cream sugar |
else | cream |
JavaScript | CoffeeMaker |
---|---|
console.log(“A cup of coffee”) |
|
JavaScript | CoffeeMaker |
---|---|
// two slashes is a comment in javascript
let number = 100;
const name = "Walter White";
var boss = "Gus Fring"; //OH NO, NOT var! :( |
|
JavaScript | CoffeeMaker |
---|---|
for (let i = 0; i < 10; i++) {
print("I love compilers!");
} |
|
JavaScript | CoffeeMaker |
---|---|
if (age < 18) {
console.log("Enjoy your early years!");
} else if (age > 60) {
console.log("Retirement age is finally here!");
} else {
console.log("Errr, good luck in adulthood :p");
} |
|
JavaScript | CoffeeMaker |
---|---|
function add(x, y) {
return x + y;
} |
|
JavaScript | CoffeeMaker |
---|---|
class Car {
constructor(name, year) {
this.name = name;
this.year = year;
}
function add(x, y) {
return x + y;
}
} |
|
- Use of undeclared identifiers.
- Variable used as a function.
- Redeclaring an already declared identifier.
- Value returned outside of function.
- decrementing/incrementing a string
- function with more arguments then allowed
- wrong types for identifiers
- Variable used within a loop is declared and initialized outside of the loop.