tracks/javascript/exercises/hexadecimal/example.js in trackler-2.2.1.37 vs tracks/javascript/exercises/hexadecimal/example.js in trackler-2.2.1.38
- old
+ new
@@ -1,17 +1,17 @@
'use strict';
function Hexadecimal(hex) {
this.hex = hex;
- this.toDecimal = function() {
+ this.toDecimal = function () {
var hexCharacters = this.hex.split('');
for (var i = 0; i < hexCharacters.length; i++) {
if (/[^0-9a-fA-F]/.exec(hexCharacters[i])) { return 0; }
}
- return parseInt(this.hex,16);
+ return parseInt(this.hex, 16);
};
}
-module.exports = Hexadecimal;
\ No newline at end of file
+module.exports = Hexadecimal;