We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3be6ac commit d29f7beCopy full SHA for d29f7be
Maths/convertBinaryToOctal.js
@@ -0,0 +1,8 @@
1
+const binaryToDecimal = (input) => {
2
+ return parseInt(input.toString(), 2);
3
+};
4
+
5
+export const binaryToOctal = (input) => {
6
+ const decimal = binaryToDecimal(input);
7
+ return Number(decimal.toString(8));
8
0 commit comments