How to convert a number to octal value in JavaScript

1 Answer

0 votes
<script type="text/JavaScript">

var num = 15;
var binary = num.toString(8);

document.write(binary + "<br />");

/*
run:

17

*/
    
</script>

 



answered Apr 7, 2016 by avibootz

Related questions

...