I am looking for a way to insert all the text from textareas to array and then convert it to string. I've tried this code:
(function () {
var array = [];
$('textarea').each(function () {
array.push(this.value);
});
});
string = array.toString()
but that returns [object Window]. Does anybody know how to fix this?
arrayoutside of its scope (the anonymous function in which it is defined).