These days, as mentioned in the OP, MDN is the best point of call for checking syntax or learning how to implement something new the right way.