Skip to content

Instantly share code, notes, and snippets.

View Reinoptland's full-sized avatar
🧑‍💻
Developing

Rein Op 't Land Reinoptland

🧑‍💻
Developing
  • The Micro Habit Company
  • Amsterdam
View GitHub Profile

Webshop routes

  1. As a customer I want to see a list of available products so I know what I can buy

GET /products

  1. As a customer I want to see the products belonging to a specific category, so I can find what I am looking for

GET /categories/:categoryId/products

@Reinoptland
Reinoptland / BMI.js
Last active November 12, 2020 15:27
BMI program for Beginner Bootcamp
const age = 31 // age
const gender = 'm' // 'm' or 'f'
const heightInM = 1.79 // height in m
const weightInKg = 82 // weight in kg
const dailyExercise = true // true or false
console.log(`
**************
BMI CALCULATOR
@Reinoptland
Reinoptland / giveTimeEstimate.js
Last active March 23, 2017 12:40
giveTimeEstimate
function giveTimeEstimate(task, experience) {
let lookPro
if (experience.includes(task)) {
lookPro = true;
return timeEstimate(task);
}
lookPro = false;
throw new Error('I don\'t know how long this will take');
}
@Reinoptland
Reinoptland / doIt.js
Last active March 23, 2017 12:40
I can do anything!
function doIt(anything, time) {
anything.progress++;
time--;
if (anything.progress === done) celebrate();
if (time) doIt(anything, time);
}