Update bubble-sort.js

define function