test scope in javascript