Add Vim exercises, cheatsheet, and project polish
Add code golf challenges for Vim practice, a weekly review template, and extend the cheatsheet with high-frequency commands. Fix the calculator `multiply` implementation and correct a logger import path.
This commit is contained in:
@@ -12,11 +12,7 @@ export class Calculator {
|
||||
}
|
||||
|
||||
multiply(a: number, b: number): number {
|
||||
let result = 0;
|
||||
for (let i = 0; i < Math.abs(b); i++) {
|
||||
result += a;
|
||||
}
|
||||
return b < 0 ? -result : result;
|
||||
return a * b;
|
||||
}
|
||||
|
||||
divide(a: number, b: number): number {
|
||||
|
||||
Reference in New Issue
Block a user