Preview:
const assert = require('assert');

const configs = {
  YEARLY_INTEREST_RATE: 4.0
};

const getSavingsAmount = amount => {
  return amount + amount * (configs.YEARLY_INTEREST_RATE / 100);
};

assert(getSavingsAmount(100) === 104);

configs.YEARLY_INTEREST_RATE = 3.0;

assert(getSavingsAmount(100) === 104);
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter