More functional js notes