JS is frustratingly nuanced