df5b34216cdb7fe1d6a65e4d0a820b0cc17e77b1
Advent of Code 2022 - Assignment3 javascript solution
This problem is all about searching for duplicates in strings. The solution is implemented using slice to split the string in half. The priority is retrieved using the ASCII charcode character for convienence. How to retrieve inputs differs between part1 and 2, therefore a checkbox is provided to toggle between different parsing methods.
References
- https://stackoverflow.com/questions/94037/convert-character-to-ascii-code-in-javascript
- https://stackoverflow.com/questions/20474257/split-string-into-two-parts
- https://www.folkstalk.com/2022/10/find-common-characters-in-two-strings-javascript-with-code-examples.html
- https://stackoverflow.com/questions/351409/how-to-append-something-to-an-array
- https://stackoverflow.com/questions/9862761/how-to-check-if-character-is-a-letter-in-javascript
- https://stackoverflow.com/questions/1966476/how-can-i-process-each-letter-of-text-using-javascript
- https://www.w3schools.com/js/js_arrays.asp
Description
Languages
JavaScript
52.2%
HTML
26.4%
CSS
21.4%