Morning notes for javascript functions