΢ Ͷ ^ ھ

2018年cba季 :JS\÷ʾ

cba㶫 www.axwwg.com  •rg2020-01-26 01:01:28   ߣ   ҪuՓ(0)

ČvJS\÷oҹ҅w£
jsе\
g\+-*/,%
߉݋\&&&|||
\++--+

ČvJS\÷oҹ҅w£

jsе\

g\+-*/,%

߉݋\&&&|||

\++--+=-=

Pϵ\<,>,=,<=,>=,!=

\=====

instance

<html>
    <head>
        <title>js\</title>
        <meta charset="UTF-8"/>
        <script type="text/javascript">
//            㔵\
            var a=1;
            var b="1";
            var c=true;
            var d=false;
            var e="123";
            var f="123a";
            console.log(a+1);//2
            console.log(b+1);//11
            console.log(a+b);//11
            console.log(a+c);//2
            console.log(a+d);//1
            console.log(a+e);//1123
            console.log(e-1);//122
            console.log(e-a);//122
            console.log(e-b);//122
            console.log(a+f);//1123a
            console.log(e/3);//41
            console.log(a-b);//0
            console.log(e%3);//0
//            ߉݋\
            console.log(a&b);//1
            console.log(a&&b);//1
            console.log(a&c);//1
            console.log(b&&c);//true
            console.log(!b);//false
            console.log(b&c);//1
            console.log(e|a);//123
            console.log(c|b);//1
            console.log(a&f);//0
            console.log(a&&f);//123a
//            Pϵ\\ <,>,>=,<=,+=,-=,!=,++,--,
//            =====
            var m1=1;
            var m2="1";
            var m3=true;
            var m4="true";
            var m5=a;
            var m6="a";
            var m7="a";
            console.log(m1==m2);//true
            console.log(m1==m3);//true
            console.log(m1==m4);//false
            console.log(m2==m3);//true
            console.log(m2==m4);//false
            console.log(m3==m4);//false
            console.log(m5==m6);//true
            console.log(m6==m7);//true
            console.log(m1===m2);//false
            console.log(m1===m3);//false
            console.log(m1===m4)//false
            console.log(m2===m3);//false
            console.log(m2===m4);//false
            console.log(m3===m4);//false
            console.log(m5===m6);//false
            console.log(m6===m7);//false
        </script>
    </head>
    <body>
    </body>
</html>

\нY

g\ڡ+Ǖrڃɂnumber͵ĔM\rֱM㔵ļӷstring͵Ĕrt׃Bӵ\ڼӷ\ͬrtM㔵\o\rt@ʾNaN,ͬM\tnumberDһȻM\

߉݋\Pϵ\\Javaһ߉݋\r@ʾ01truefalse

==,䌦ͬ͵ĔֱMб^ڲͬ͵ĔtnumberMһDȻMб^

===ȱ^Ͳֱͬfalse,ͬrtMһ^ͬtrue

dȤѿʹھHTML/CSS/JavaScripta\й//tools.jb51.net/code/HtmlJsRunyԇa\Ч

PJavaScriptPݿɲ鿴վ}JavaScriptDOMɿYJavaScriptԪزɿYJavaScript¼PcɴȫJavaScript㷨ɿYJavaScriptYc㷨ɿYJavaScriptv㷨cɿYJavaScripte`c{ԇɿY

ϣJavaScriptOӋ

ܸdȤ:

  • js c\ || &&
  • javascriptԪ\÷
  • jsе || c && \Ԕ
  • javascript typeof÷ctypeof\B[Ԕ]
  • JSλ(~)\c~~\
  • Javascript λȡ\ (~)
  • Javascript λ\ʹýB(<<)
  • Ԕjs\Qܡ|c||÷ýB
  • JavaScriptλ\(o̖) >>> ̖ ʹ÷Ԕ
  • js߉݋\ ||
  • JavaScriptаλ\ʹýB
  • \ՄJS\&&|| 䃞ȼ

P

  • JS\÷ʾ

    JS\÷ʾ

    ČvJS\÷oҹ҅w£ jsе\ g\+-*/,% ߉݋\&&&||| \++--+
    2020-01-26