var nodeWordsString = document.getElementById("nodeWordsTextArea").value.trim();
    var nodeWordsStringArray=nodeWordsString.split(" ");
    var strLength = nodeWordsStringArray.length;
    for(int i = 0; i < nodeWordsStringArray.length; i++)----->******
    {
        for(int j = 0; j < nodeWordsStringArray.length; j++)
        {
            if(nodeWordsStringArray(i) == nodeWordsStringArray(j))
            {
                alert("Node duplication occurred at:"+nodeWordsStringArray(i));
                return false;
                //break;
            }
        }
    }
**showing error like missing ; after for-loop initializer in java script console(firebug).
please help me.  
This is javascript, but you're using int in your loop declaration? Try replacing those with var instead.
In my case, the error was caused by using let in the loop. Old browsers like Firefox 38 doesn't support let.
Replacing let by var solved the issue.
Change int i and int j to var i and var j.
If you are here in 2016, maybe you are trying to use a let declaration outside strict mode in a browser that does not yet support it. Replace it with var or add 'use strict;' to the top of your function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With