Function range which returns array containing 0 upto x