You need to replace (remove) the dots first in the thousands separator, then take care of the decimal:
function isNumber(n) {
'use strict';
n = n.replace(/\./g, '').replace(',', '.');
return !isNaN(parseFloat(n)) && isFinite(n);
}
You need to replace (remove) the dots first in the thousands separator, then take care of the decimal:
function isNumber(n) {
'use strict';
n = n.replace(/\./g, '').replace(',', '.');
return !isNaN(parseFloat(n)) && isFinite(n);
}