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. 去除html标签 正则 <.+?> 解释

    http://baike.baidu.com/link?url=2zORJF9GOjU8AkmuHDLz9cyl9yiL68PdW3frayzLwWQhDvDEM51V_CcY_g1mZ7OPdcq8 ...

  2. js jquery版本的 金额千分位转换函数(非正则,效率极高)

    没想到js里面没有 金额千分位格式化的处理函数(例:1,234.01 这样的格式),网上搜了一圈,都是使用正则的方式处理的.正则的效率不敢恭维啊,又耗费资源速度又慢(虽然处理起来会直观一些). 因此专 ...

  3. light工具

    环境变量 C:\Users\zhangqm\AppData\Roaming\npm\; 安装 npm install -gd jresplus 不要用npm install -gd light pro ...

  4. 在 Azure 中使用公用 IP 创建多 NIC VM

    Russ Slaten  2014年 11 月 18日下午 4点 我们最近宣布了支持具有多个网络接口控制器 (NIC) 的虚拟机 (VM).我仍在努力了解此功能适用的所有新场景,但首先,我希望亲自测试 ...

  5. class属性添加多个类

    <html> <head> <style type="text/css"> h1.intro { color:blue; text-align: ...

  6. 《深入Java虚拟机学习笔记》- 第1章 Java体系结构

    一.体系结构组成 当编写并运行一个Java程序时,就同时体验了这四种技术.用Java语言编写源代码,编译成Java Class文件,然后再在Java虚拟机上运行class文件.当编写程序时,通过调用类 ...

  7. visual studio 2012 update3

    http://www.microsoft.com/zh-cn/download/confirmation.aspx?id=39305

  8. SourceGrid zt

    SourceGrid介绍和使用及实例举例 先上图,来一个简单演示: SourceGrid就是一个用于数据显示的表格控件,这个控件比c#自带的 DataGridView要强大很多,先不说他的原理,只说他 ...

  9. sublime3安装python插件 -- SublimeCodeIntel

    先装Package Control,类似pip的一个索引安装工具. 1.http://sublime.wbond.net/Package%20Control.sublime-package 2.sub ...

  10. Base-Android快速开发框架(五)--网络操作之RequestModel、ResponeModel、CustomAsyncHttpClient

    在正式介绍CustomAsyncHttpClient之前,刚好最近有一个朋友找我帮忙给他们看下一个APP.我先上一段代码截图.一段检测版本更新的接口代码.