Li-Fan Chen says to YSITD
把var x =1 移到function createArray裡面呢