Ví dụ RUN
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <meta charset="utf-8">
5
    </head>
6
    <body>
7
        <h1>Học lập trình miễn phí tại freetuts.net</h1>
8
  
9
        <button onclick="myFunction()">Run</button>
10
  
11
        <p id="demo"></p>
12
  
13
        <script>
14
            function myFunction() {
15
                var content = ' 4 - ' + isFinite(4) + '<br>';
16
                content = content + ' Hello - ' + isFinite('Hello') + '<br>';
17
                content = content + ' -5 - ' + isFinite(- 5) + '<br>';
18
                content = content + ' infinity - ' + isFinite(Infinity) + '<br>';
19
                document.getElementById("demo").innerHTML = content;
20
            }
21
        </script>
22
    </body>
23
</html>