String Concatenation Operator Precedence - Javascript Language Basics

Javascript examples for Language Basics:Introduction

Description

String Concatenation Operator Precedence

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>
<html>
    <head>
        <title>Example</title>
    </head>
    <body>
        <script type="text/javascript">

            var myData1 = 5 + 5;//w  w w.ja v a2  s.co  m
            var myData2 = 5 + "5";

            document.writeln("Result 1: " + myData1);
            document.writeln("Result 2: " + myData2);

        </script>
    </body>
</html>

Related Tutorials