I am making use of HTML5 canvas for visual representation of selection sorting. I made seperate draw function and placed it inside the outer for-loop ,intended to update scr