// @ts-check
//
// The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion when
// implementing this exercise.

/**
 * The day rate, given a rate per hour
 *
 * @param {number} ratePerHour
 * @returns {number} the rate per day
 */
export function dayRate(ratePerHour) {
  throw new Error('Implement the dayRate function');
}

/**
 * Calculates the rate per month
 *
 * @param {number} ratePerHour
 * @param {string} discount for example 20%
 * @returns {number} the rounded up monthly rate
 */
export function monthRate(ratePerHour, discount) {
  throw new Error('Implement the monthRate function');
}

/**
 * Calculates the number of days in a budget, rounded on one decimal
 *
 * @param {number} budget the total budget
 * @param {number} ratePerHour the rate per hour
 * @param {string} discount the discount to apply
 * @returns {string} the number of days
 */
export function daysInBudget(budget, ratePerHour, discount) {
  throw new Error('Implement the daysInBudget function');
}

/**
 * Applies a discount to the value
 *
 * @param {number} value
 * @param {string} percentage a percentage such as '20%'
 * @returns {number} the discounted value
 */
function applyDiscount(value, percentage) {
  throw new Error('Implement the applyDiscount function');
}

@@ -11,16 +11,19 @@
 ck%0A//%0A//
+ %E2%98%9D%F0%9F%8F%BD
  The lin
@@ -162,43 +162,735 @@
 ion 
-when%0A// implementing this exercise.
+on the web%0A// and supported IDEs when implementing this exercise. You don't need to%0A// understand types, JSDoc, or TypeScript in order to complete this JavaScript%0A// exercise, and can completely ignore this comment block and directive.%0A%0A// %F0%9F%91%8B%F0%9F%8F%BD Hi again!%0A//%0A// A quick reminder about exercise stubs:%0A//%0A// %F0%9F%92%A1 You're allowed to completely clear any stub before you get started. Often%0A// we recommend using the stub, because they are already set-up correctly to%0A// work with the tests, which you can find in ./freelancer-rates.spec.js.%0A//%0A// %F0%9F%92%A1 You don't need to write JSDoc comment blocks yourself; it is not expected%0A// in idiomatic JavaScript, but some companies and style-guides do enforce them.%0A//%0A// Get those rates calculated!
 %0A%0A/*

Add welcome block