Skip to content

Instantly share code, notes, and snippets.

@jalcine
Forked from jonathanmarvens/contracting-rate-info.js
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalcine/68dd27c48e243ad28359 to your computer and use it in GitHub Desktop.
Save jalcine/68dd27c48e243ad28359 to your computer and use it in GitHub Desktop.
function contractingRateInfo( options ) {
var
committed_days,
committed_days_cost,
committed_hours,
committed_hours_cost,
hourly,
weekly
;
committed_days = ( options.committed_days || 3 );
committed_hours = ( options.committed_hours || 24 );
hourly = ( options.hourly || 150 ); // Don't undervalue yourself.
weekly = ( ( hourly * 40 ) * ( 49 / 50 ) );
committed_hours_cost = ( hourly * committed_hours );
committed_days_cost = ( weekly * ( committed_days / 5 ) );
console.log( "" );
console.log( "----- Hourly -----" );
console.log( "Rate: $" + hourly );
console.log( committed_hours + "-hour commitment: $" + committed_hours_cost );
console.log( "" );
console.log( "----- Weekly -----" );
console.log( "Rate: $" + weekly );
console.log( committed_days + "-day commitment: $" + committed_days_cost );
console.log( "" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment