Skip to content
Browse files

Fixed typo

Fixed typo
  • Loading branch information...
1 parent 60c15cd commit bf3c7edd28f012a0ffaa95c77bbbc349b78bd79d @Rafase282 Rafase282 committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 Algorithm-Convert-HTML-Entities.md
View
4 Algorithm-Convert-HTML-Entities.md
@@ -62,7 +62,7 @@ return str;
}
```
-## Advance Solution
+## Advanced Solution
```js
function convert(str) {
@@ -81,7 +81,7 @@ function convert(str) {
}
```
-# Code Explanation (Advance Solution):
+# Code Explanation (Advanced Solution):
- Create a object to use the Lookup functionality to easily find the characters.
- Split the original string by characters and use map to check for the changed html entity or use the same one. Alternatively you could use Regex `str.replace(/&|<|>|"|'/gi`.
- The a function is added which is what returns the converted entity or the original one if there is no conversion. If you go the regex route then you just have to return the matched hits. `return html[entity];`

0 comments on commit bf3c7ed

Please sign in to comment.
Something went wrong with that request. Please try again.