I do not have correct logic yet, but while I am working on to get my logic right, I need help for 'undefined…" error at return statement.

code start below…

```
function convertToRoman(num) {
var numRomObj = { 1:"I", 2:"II",3:"III", 4:"IV", 5:"V",6:"VI", 7:"VII", 8:"VIII",9:"IX", 10:"X", 40:"XL", 50:"L", 90:"XC",100:"C",400:"CD", 500:"D", 900:"CM", 1000:"M", 2000:"MM", 3000:"MMM" };
var romanNum;
var numArray = num.toString().split("");// for num = 36 answer is ["3',"6"]
var l = numArray.length;
for (var i = 0; i <= l; i++){
var j = numArray[i];
romanNum += numRomObj[j];
}
return romanNum;//undefinedIIIVIundefined
}
convertToRoman(36);
```