0
I tried to write a foolproof code for the first part of the first problem on adventofcode, and I was hoping for some feedback.
function findEndFloor(floors, upFloorSymbol, downFloorSymbol) {
if (typeof floors !== 'string')
throw 'parameter 1 is expected to be a string';
if (typeof upF...