Adding setBits function to javascript homework.