Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
linq-style in javascript
//JavaScript-C24.2.0 (SpiderMonkey) //https://gist.github.com/DanDiplo/30528387da41332ff22b var people = [ { name: "John", age: 20 }, { name: "Mary", age: 35 }, { name: "Arthur", age: 78 }, { name: "Mike", age: 27 }, { name: "Judy", age: 42 }, { name: "Tim", age: 8 } ]; // filter is equivalent to Where var youngsters = people.filter(f => { return f.age < 30; }); youngsters.forEach(f => { print(f.name + ' ' + f.age); });
run
|
edit
|
history
|
help
0
Star wars ep 3. limit
js
fb_series
1
говнокод
JS exam part 2 - Moms
single_digit
123141242342
Loops
game green