I have a function that returns a string:
function buildCell(){
var returnString = '';
returnString += '<td>';
returnString += 'Cell Contents';
returnString += '</td>';
return(returnString);
}
I have another function that should invoke the first string and return its value inline:
function buildTable(){
$('body').html(
'<table>'
+'<tr>'
+ buildCell()
+'</tr>'
)
}
My table doesn't have the cell, the cell comes back undefined. How do i properly concatenate the return of the first function in the second?
Edit: I removed the semicolon and still receive "undefined". When I place an alert in the first function I see the correct value in the alert, but it is still undefined in the second function.