javascript examples that represent popular patterns on js