var nodeWordsString = document.getElementById(\"nodeWordsTextArea\").value.trim(); var nodeWordsStringArray=nodeWordsString.split(\" \"); var strLength = nodeWor
This is javascript, but you're using int in your loop declaration? Try replacing those with var instead.
int
var