Q:

does linq work in javascript

I have this in javascript and it evaluates as expected to a string representing a number (valid one): 
dt2.Rows[0]["CountryID"]

I was wondering if I can combine this in javascript with linq
something like dt2.Rows.Select (x => x.CountryID) 
so I can retrieve all country ids at once. But I get a syntax error. What is the correct syntax for linq in javascript (if it exists). 

A:

LINQ is part of C#, not Javascript. However, there are some libraries (like LINQ.JS - here is an example) that will recreate this. 
To get the same effect in JS, just use a loop?
Like so:
var idList = new Array(dt2.Rows.length);
for(var index = 0; index < dt.Rows.length; index++){
        idList[index] = dt2.Rows[index].CountryId;
}

