Okay so I've read this closure question and tried to fit the idea behind my script. This is what I have so far but the console is telling me that nameOfLoan[j] does not exist and I can't figure out why.
$('body').on('keyup', '.qForms', function() {
var nameOfLoan = [];
var loanOfName = function(t) {
$('body').on('keyup', '.loanNameV'+t, function() {
console.log('hi');
var loanN = $('.loanNameV'+t).val();
$('.nameLoan'+t).text(loanN);
});
};
for (var t=1; t < z; t++) {
nameOfLoan[t] = loanOfName(t);
}
for (var j=1; j < z; j++) {
nameOfLoan[j]();
}
});