๐Ÿ“–JSDoc

/**
 * Adds VAT to a price 
 *  
 * @param {number} price The price without VAT 
 * @param {number} vat The VAT [0-1] 
 *  
 * @returns {number} 
 */
 function addVAT(price, vat = 0.2) {  
   return price * (1 + vat)
 }

Last updated