Hi,
Your javascript code is valid javascript code, that can not generate an error.
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Lemon");
It should really matter how you create the list, static or dynamically.
Attached an updated example with exactly your javascript code working.
The key is to deserialize to a Text List in your case as the javascript object is just an array of strings.
Regards,
Daniel