This is the type of solution that requires you to know math. How the hell am I suppose to know 1000 * 0.05 would give me 5% of 1000? Yeah, only when I know math.
if the tax is 12% for example (t = 0.12), then what remains is 88% of your earnings. 1-t = 0.88. This is the number by which you should multiply your earnings.
what does (1 - tax) mean in this solution ?
im confused
how does it work ?
1 is used in many solutions. what does it express ? explain to me as if I were a child please
Those are local variables. Mutating them will not have an outside effect. ( Because they are primitive values. You would be right if they were objects. )
This comment is hidden because it contains spoiler information about the solution
This doesn't affect the variable outside the function. Primitive values are passed by copy.
Good but this overwrites the original principal. Better save it initially to a temp variable.
A true software engineer.
100 actually
How else would you calculate a percentage?
This is the type of solution that requires you to know math. How the hell am I suppose to know 1000 * 0.05 would give me 5% of 1000? Yeah, only when I know math.
Sneaky way to ensure the response is a boolean, instead of null.
why these !! ?
if the tax is 12% for example (t = 0.12), then what remains is 88% of your earnings. 1-t = 0.88. This is the number by which you should multiply your earnings.
what does (1 - tax) mean in this solution ?
im confused
how does it work ?
1 is used in many solutions. what does it express ? explain to me as if I were a child please
This makes so much sense now. Thank you!
Those are local variables. Mutating them will not have an outside effect. ( Because they are primitive values. You would be right if they were objects. )
The solution being broken would not be the biggest problem in either of those cases.
Loading more items...