mihaifm / linq

linq.js - LINQ for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use latest linq in html

realakuma opened this issue · comments

Hi mihaifm

Sorry to disturb you. could you tell me how to use linq in a html.

Appreciate!

Hi

Just include linq.js as a script in your html (you can even use one of the CDN links available in the readme). The Enumerable object should be available globally.

<html>
    <head>
        <script src="https://unpkg.com/linq@3.2.3/linq.js"></script>
        <script>
            console.log(Enumerable.from([1, 10, 100, 1000]).count());
        </script>
    </head>
</html>

Hi
Appreciate!!!