Если выводить нужно не меньше указанного то -
<input type="text" id="theNumber" value=""></div>
var planetsList = {
"Mercury": 0,
"Venus": 0,
"Earth": 1,
"Marts": 2,
"Jupiter": 16,
"Saturn": 17,
"Uranus": 14,
"Neptune": 2,
"Pluto": 1
};
function getNumber() {
var number = +this.value;
outputPlanets(number);
}
function outputPlanets(num) {
var list = "";
for(var planet in planetsList) {
if(num <= planetsList[planet]) {
list += planet + " ";
}
}
console.log(list);
}
window.onload = function() {
document.getElementById("theNumber").addEventListener("change", getNumber, false);
};