Skip to content

Commit

Permalink
Merge pull request #299 from ckpinguin/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
sudheerj authored Nov 15, 2024
2 parents 4169096 + 4e4df97 commit b13c320
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@
Let's take an example of adding function with memoization,

```javascript
const memoizAddition = () => {
const memoizeAddition = () => {
let cache = {};
return (value) => {
if (value in cache) {
Expand All @@ -1121,8 +1121,8 @@
}
};
};
// returned function from memoizAddition
const addition = memoizAddition();
// returned function from memoizeAddition
const addition = memoizeAddition();
console.log(addition(20)); //output: 40 calculated
console.log(addition(20)); //output: 40 cached
```
Expand Down

0 comments on commit b13c320

Please sign in to comment.