博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
object is_Object is()方法
阅读量:2504 次
发布时间:2019-05-11

本文共 820 字,大约阅读时间需要 2 分钟。

object is

This method was introduced in ES2015. It aims to help comparing values.

ES2015中引入了此方法。 它旨在帮助比较价值。

Usage:

用法:

Object.is(a, b)

The result is always false unless:

结果始终为false除非:

  • a and b are the same exact object

    ab是相同的精确对象

  • a and b are equal strings (strings are equal when composed by the same characters, in the same order)

    ab是相等的字符串(当由相同的字符以相同的顺序组成时,字符串是相等的)

  • a and b are equal numbers (numbers are equal when their value is equal)

    ab是相等的数字(数值相等时数字相等)

  • a and b are both undefined, both null, both NaN, both true or both false

    abundefined ,都为null ,都为NaN ,都为true或均为false

0 and -0 are different values in JavaScript, so pay attention in this special case (convert all to +0 using the + unary operator before comparing, for example).

0-0是JavaScript中的不同值,因此请注意这种特殊情况(例如,在进行比较之前,使用+一元运算符将所有值转换为+0 )。

翻译自:

object is

转载地址:http://etqgb.baihongyu.com/

你可能感兴趣的文章
程序在本地能启动而预发布不能启动
查看>>
Lucene、ES好文章
查看>>
有关定时器setTimeout()、setInterval()详解
查看>>
刷题总结——次小生成树(bzoj1977 最小生成树+倍增)
查看>>
html5-2 html实体和颜色有哪些
查看>>
饺紫猫配色教程
查看>>
第三百六十九节,Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)用Django实现搜索功能...
查看>>
第八十节,CSS3边框图片效果
查看>>
第一百九十五节,jQuery EasyUI,Resizable(调整大小)组件
查看>>
Gym 101128F Landscaping(网络流)题解
查看>>
使用Expression进行查询拼接
查看>>
父页面获得子页面的值
查看>>
elment 中 el-table 进行校验
查看>>
SQL server 动态查询(表名或字段动态),并且获取想得到的返回值结果
查看>>
Nginx配置详解
查看>>
突袭HTML5之WebGL 3D概述(上) - WebGL原生开发
查看>>
SQL 映射的 XML 文件
查看>>
转:如何成为Linux高手
查看>>
Oracle数据库修改LISTENER的监听端口
查看>>
jvm 监控工具
查看>>