https://mysteryweevil.medium.com/nested-if-statements-in-javascript-a-comprehensive-guide-567459e70364