// Converts input base-10 numbers to hex. Requires jQuery.

// TODO make this work with "enter" keypress as well as clicking submit button

$(document).on('ready', function() {

  $('#submitToHex').click(function() {

    // Clear results
    $('#tohex-results').empty();

    // Grab input and set default to '15'
    var input = $("#inputNumber").val()
    if (input === "") {
      input = '15';
    }

    // Parse input string into a (base 10) integer, then convert this into a
    // hex (base 16) representation of itself. Also prepend that "0x" bc why not.
    $("#tohex-results").append('<br>0x' + parseInt(input).toString(16) + '</br>');

  })
})

@@ -446,13 +446,12 @@
 10) 
-integ
+numb
 er, 
@@ -613,16 +613,20 @@
 nt(input
+, 10
 ).toStri

Set explicit radix for parseInt