You need to perform a global replacement as, by default, replace
only performs one replacement. In theory you can pass an instruction to be global as the third argument, but that has some compatibility issues. Use a regular expression instead.
checkedNew = checked.replace(/\./g, "");