Numbers - Javascript Language Basics

Javascript examples for Language Basics:Introduction

Introduction

The number type can represent both integer and floating-point numbers.

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>
<html>
    <head>
       <title>Example</title>
    </head>
    <body>
        <script type="text/javascript">
            var daysInWeek = 7;//from   w  w  w  . j  a v a 2 s  .  c o  m
            var pi = 3.14;
            var hexValue = 0xFFFF;
        </script>
    </body>
</html>

Related Tutorials