Lab for javascript advanced functions