Skip to content

Completed JavaScript Foundations Project - #1

Open
nati-alvarez wants to merge 8 commits into
masterfrom
Natividad-Alvarez
Open

Completed JavaScript Foundations Project#1
nati-alvarez wants to merge 8 commits into
masterfrom
Natividad-Alvarez

Conversation

@nati-alvarez

Copy link
Copy Markdown
Owner

No description provided.

@katfsw

katfsw commented Apr 30, 2020

Copy link
Copy Markdown
Collaborator

Nice job committing after each task! 🎉

Comment thread index.js


const principal = 200000;
const interest = 0.05;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

Comment thread index.js
*/


const monthlyInterestRate = interest / 12;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good!

Comment thread index.js
const numerator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, periods);
const denominator = Math.pow(1 + monthlyInterestRate, periods) - 1;
const monthlyRate = principal * (numerator/denominator);
console.log(monthlyRate.toFixed(2));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🔥🔥

Comment thread index.js
return `${name}, your monthly rate is $${monthlyRate.toFixed(2)}`;
}

console.log(mortgageCalculator(200000, 0.05, 30, 750));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome job!

Comment thread index.js
return `${name}, your monthly rate is $${monthlyRate.toFixed(2)}`;
}

console.log(mortgageCalculatorPrompt());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woot woot ! looks great!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants