int в восьмого JavaScript
yourNumber = parseInt(octString, 8);
Thoughtful Trout
yourNumber = parseInt(octString, 8);
octString = yourNumber.toString(8);