my attempt at decoding the JS language