1 parent 8025e29 commit 7a2c63dCopy full SHA for 7a2c63d
1 file changed
problemSolvingPractices/problems/p3-ConversionTool/script.js
@@ -123,7 +123,7 @@ function DeicmalToBinary(Decimal){
123
const octets = Decimal.split('.')
124
125
// more error checks
126
- if (octets.length !== 4) return errorMsg4
+ // if (octets.length !== 4) return errorMsg4
127
128
if (octets[0].length > 3 || octets[0].length < 1) return errorMsg5
129
if (octets[1].length > 3 || octets[1].length < 1) return errorMsg5
@@ -159,7 +159,7 @@ function DeicmalToBinary(Decimal){
159
160
let octetTwo = Number(octets[1])
161
162
- if (Number.isNaN(octetTwos)) return errorMsg4
+ if (Number.isNaN(octetTwo)) return errorMsg4
163
if (octetTwo < 0 || octetTwo > 255) return errorMsg6
164
165
for (let i=0; i < chart.length; i++) {
0 commit comments