Sp Vs Function In Javascript Example