Updated bubblesort.js

Takes an input array and applies bubblesort algorithm to sort it