Intuitive Javascript Solution


  • 1
    D
    var convertToBase7 = function(num) {
        // use Number's native api to convert to base 7 presentation
        return Number(num).toString(7);
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.