👩🏾‍💻 back at it w/ javascript basic algorithm