Skip to content

Commit b355ee9

Browse files
committed
add check for number of octets
1 parent 2e51e7b commit b355ee9

File tree

1 file changed

+1
-1
lines changed
  • problemSolvingPractices/problems/p3-ConversionTool

1 file changed

+1
-1
lines changed

problemSolvingPractices/problems/p3-ConversionTool/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function DeicmalToBinary(Decimal){
125125
const octets = Decimal.split('.')
126126

127127
// more error checks
128-
// if (octets.length !== 4) return errorMsg4
128+
if (octets.length !== 4) return errorMsg4
129129

130130
if (octets[0].length > 3 || octets[0].length < 1) return errorMsg5
131131
if (octets[1].length > 3 || octets[1].length < 1) return errorMsg5

0 commit comments

Comments
 (0)