TOP - JavaScript - 演算子 - +−

加法演算子は次の通りです。
+ : 加算
- : 減算

(例)
<SCRIPT type="text/javascript">
<!--
    function btnclick()
    {
        var s = "15 + 45 →  : " + (15 + 45) + "\n";
        s = s + "15.33 + 12.22 →  : " + (15.33 + 12.22) + "\n";
        s = s + "55 - 22 →  : " + (55 - 22) + "\n";
        s = s + "15.33 - 12.22 →  : " + (15.33 - 12.22) + "\n";
        s = s + '文字の連結 "15" + "45" →  : ' + ("15" + "45") + "\n";
        alert(s);
    }
//-->
</SCRIPT>


Copyright(C) 2006-2011 CLAYPOT. All Rights Reserved.