range function in js