1.  logic operation : '&&' and '||'  .For this two logic operations,its' results are inconclusive.the difference between this two logic operations  and others is that they don't change the data type of the operands and also don't change the data type of the operation result. In the expression , this operator(&& and ||) will understand the type of the operands as the bool type ,so they can  execute bool operation.you can have a look below.

 <html>
<head>
<meta http-equiv="content-type" charset="utf-8"/>
<script type="text/javascript">
var str = "hello";
var obj = {};
alert(str || obj);//str as string type ,obj as an object,return str("hello")
alert(str && obj);//return obj
alert(undefined || 123);//undefined as false,and return 123
</script>
</head>
<body>
</body>
</html>

2.  comparison operation. For comparing two value type data,generally just compare their values.For comparing a value type data and a reference type data,first switch the reference type data to the same type as the value type data,then compare them.For comparing two reference type data,it's unmeaning and always return false.like below:

 <html>
<head>
<meta http-equiv="content-type" charset="utf-8"/>
<script type="text/javascript">
var o1 = {};
var o2 = {};
var str = "123";
var num = 1;
var b0 = false;
var b1 = true;
var ref = new String(); alert(b1 < num);//return false;
alert(b1 <= num);//return true;
alert(b1 > b0);//return true; alert(num > ref);//return true; alert(o1 > o1 || o1 < o2 || o1 == o2);//always return false;
</script>
</head>
<body>
</body>
</html>

Javascript Basic Operation Extraction的更多相关文章

  1. matlab basic operation command

    Matlab basic operation: >> 5+6 ans = 11 >> 3*4 ans = 12 >> 2^6 ans = 64 >> 1 ...

  2. 【MongoDB】The basic operation of Index in MongoDB

    In the past four blogs, we attached importance to the index, including description and comparison wi ...

  3. JavaScript Basic

    Exercise-1 Write a JavaScript program to display the current day and time in the following format. T ...

  4. Basic Operation about Linux

    1. 永久开启/关闭防火墙 在linux中防火墙是一个名叫iptables的工具 开启: chkconfig iptables on 关闭: chkconfig iptables off 即时生效,重 ...

  5. mysql basic operation,mysql总结

    mysql> select * from wifi_data where dev_id like "0023-AABBCCCCBBAA" ; 1.显示数据库列表.show d ...

  6. HDFS Basic Operation

    1.如何启动一个命令行的hadoop客户端 任何一个Hadoop集群中的节点,只要有hadoop安装包,就可以通过# hadoop fs来启动 2.Hadoop基本命令格式 # hadoop  fs  ...

  7. JavaScript Basic Memo

    1.this 的指向 1).由 new 调用?绑定到新创建的对象. 2). 由 call 或者 apply(或者 bind)调用?绑定到指定的对象. 3). 由上下文对象调用?绑定到那个上下文对象. ...

  8. Chapter 2 JavaScript Basic

    Has 5 primitive types: Undefined, Null, Boolean, String, Number. typeof  operator Undefined return u ...

  9. mysql basic operation,mysql总结,对mysql经常使用语句的详细总结,MySQL学习笔记

    mysql> select * from wifi_data where dev_id like "0023-AABBCCCCBBAA" ; 1.显示数据库列表.show d ...

随机推荐

  1. HTML5学习(五)----SVG

    参考教程地址:http://www.w3school.com.cn/html5/html_5_svg.asp HTML5 支持内联 SVG. 什么是SVG? SVG 指可伸缩矢量图形 (Scalabl ...

  2. short s1 = 1; s1 = s1 + 1;有错而short s1 = 1; s1 += 1正确

    这个问题以前碰到过,也研究过,发表一下:    如果你认为表达式(x += i)只是表达式(x = x + i)的简写方式,这并不准确.这两个表达式都被称为赋值表达式.第二个表达式使用的是简单赋值操作 ...

  3. bzoj2245

    这道题还是比较简单的费用流,由于w是递增的 实际上,这题数据还可以强一点,比如说分段函数不保证费用递增, 就要加一点技巧了(要保证函数的顺序) ; type node=record        ne ...

  4. poj3274

    很不错的hash 优化有两个方面:1.根据题目换一个更优化的算法 2.在算法运行过程中优化 这题除了暴力好像没别的办法了吧? 但是暴力也是有策略的! 到第i只牛特征为j的总数为sum[i,j]; 找到 ...

  5. [原]Unity3D深入浅出 - 新版粒子系统 (Shuriken)

    Shuriken粒子系统是继Unity3.5版本之后推出的新版粒子系统,它采用了模块化管理,个性化的粒子模块配合粒子曲线编辑器使用户更容易创作出各种兵分复杂的粒子效果. 创建一个粒子系统的方式有两种: ...

  6. I.MX6 U-boot PWM hacking

    /******************************************************************************* * I.MX6 U-boot PWM ...

  7. EF框架step by step(8)—Code First DataAnnotations(2)

    上一篇EF框架step by step(7)—Code First DataAnnotations(1)描述了实体内部的采用数据特性描述与表的关系.这一篇将用DataAnnotations描述一下实体 ...

  8. Gen_event行为分析和实践

    1.简介 Gen_event实现了通用事件处理,通过其提供的标准接口方法以及回调函数,在OTP里面的事件处理模块是由一块通用的事件管理器和任意数量的事件处理器,并且这些事件处理器可以动态的添加和删除. ...

  9. 交易策略研究 R库

    本文在Creative Commons许可证下发布 交易策略研究 R库,直接安装:xts, TTR,quantmod,RTAQ,PerformanceAnalytics,FactorAnalytics ...

  10. 多线程与网络之JSON和XML数据的解析

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...