• problem in js.checkIO

 

hi when i test my code in my chorome and my editor my program work but when i post it on site to check my code give me error

i working on more nighbourhood and my code is

function countNeighbours(data,row,col){ var index=0 var alg=data

            for(var i=(row-1);i<=(row+1);++i)
            {

                for(var j=(col-1);j<=(col+1);++j)
                    {

                        if(alg[i][j]!="undefined" && alg[row][col]!=1   )
                            {

                                    if(alg[i][j]==1  )
                                    {
                                        ++index
                                    }

                            }
                    }

            }
            return index
        }

why happend this