Javascript adding zeros to the beginning of a string

[code type=javascript]
function pad_with_zeroes(number, length) {
var my_string = ” + number;
while (my_string.length < length) { my_string = '0' + my_string; } return my_string; }