Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This Pull Request optimizes the functions used in `/docs/_spec/public/scripts/main.js`. ## Changes made: 1. `currentChapter()` function was simplified using `split()` and `pop()` instead of `lastIndexOf()` and `substring()`. 2. Used template literals for string interpolation. 3. Simplified the `heading` function by reducing repetitive code and improving readability. 4. Changed `.removeClass()` and `.addClass()` to `.toggleClass()` for toggling the class based on condition. 5. General cleanup and optimization for better readability and performance.
- Loading branch information