I am trying the following in the Roman Numeral Converter Project:
var num = 36;
var arabic = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];
var roman = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];
for (var i = 0; num > arabic[i]; i++) {
console.log(i);
}
I am just logging i in an attempt to see whether this works or not. It is not. Why would something like this not work?