Is this how you Javascript?