#!/usr/bin/env node; /****************************************************************************** * This program computes the combined FICA taxes with formatted output. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ const Utils = require('./Utils'); const FICA_RATE = 0.0765; const GROSS_PAY = 1000; const main = async () => { let ficaTax = GROSS_PAY * FICA_RATE; let netPay = GROSS_PAY - ficaTax; console.log(Utils.format("Gross Pay: {0:.2f}", GROSS_PAY)); console.log(Utils.format("FICA Tax: {0:.2f}", ficaTax)); console.log(Utils.format("Net Pay: {0:.2f}", netPay)); } main().catch( e => { console.error(e) } );