Adapted from The Odin Project Javascript/jQuery lesson