当前位置: 首页 > news >正文

别人做的网站如何要回服务器关键字排名查询工具

别人做的网站如何要回服务器,关键字排名查询工具,做软件去哪个网站,网站存在的缺陷1、基本使用 空值合并运算符(??)英文名称为 Nullish coalescing operator,是一个逻辑运算符。 特性:当左侧的操作数为 null 或者 undefined 时,返回其右侧操作数,否则返回左侧操作数。 const foo nul…

1、基本使用

空值合并运算符(??)英文名称为 Nullish coalescing operator,是一个逻辑运算符。

特性:当左侧的操作数为 null 或者 undefined 时,返回其右侧操作数,否则返回左侧操作数。

const foo = null ?? 'default string';
console.log(foo);
// expected output: "default string"const baz = 0 ?? 42;
console.log(baz);
// expected output: 0

2、与逻辑或运算符(||)区别

与逻辑或运算符(||)不同的是,当左侧操作数为 0、空字段、布尔false 时,空值合并运算符??均返回左侧操作数。

const num = 0 ?? 1;
console.log(num) // 0const flag = false ?? true;
console.log(flag)  //falseconst str = '' ?? 'string';
console.log(str) // ''

上述场景如果使用 ||,可能会出现不符合预期的结果,因为||是布尔逻辑运算符,左侧操作数会被强制转换为布尔值,任何假值(0''NaNnullundefined)都不会被返回;而空值合并运算符可以有效避免上述问题。

3、??短路逻辑

此外,??与 OR 和 AND 逻辑运算符相似,当左表达式不为 nullundefined 时,直接返回左侧表达式,不会对右表达式进行求值。

const fn1 = () => {console.log('fn1被调用了'); return 'fn1';}
const fn2 = () => {console.log('fn2被调用了'); return 'fn2';}
const fn3 = () => {console.log('fn3被调用了'); return null;}console.log(fn1() ?? fn2());
//打印 fn1被调用了
// fn1
// 由于fn1 返回值不为null、undefined,fn2 未被调用console.log(fn3() ?? fn2());
//fn3被调用了
//fn2被调用了
//fn2
// 由于fn3 返回值为null,fn2 被调用

4、不能直接与逻辑 &&||使用

要注意的是,由于空值合并运算符??和其他逻辑运算符之间的运算优先级/运算顺序是未定义的,不能直接与逻辑 &&||使用,否则会抛错;通过括号明确运算优先级,才能正确运行。

true && null ?? 'default string' // 抛出 SyntaxError
false || undefined ?? "default string"; // 抛出 SyntaxError(true && null) ?? "default string"; // true
(false || undefined) ?? "default string"; //'default string'

文章转载自:
http://kokura.jftL.cn
http://sainted.jftL.cn
http://jodo.jftL.cn
http://guanethidine.jftL.cn
http://dyak.jftL.cn
http://arden.jftL.cn
http://cadence.jftL.cn
http://latera.jftL.cn
http://sherry.jftL.cn
http://shiraz.jftL.cn
http://paradisaical.jftL.cn
http://abampere.jftL.cn
http://proofplane.jftL.cn
http://unlikeness.jftL.cn
http://geostatic.jftL.cn
http://unofficious.jftL.cn
http://reroll.jftL.cn
http://cognoscitive.jftL.cn
http://indicatory.jftL.cn
http://towrope.jftL.cn
http://mascara.jftL.cn
http://thousands.jftL.cn
http://santeria.jftL.cn
http://heatspot.jftL.cn
http://staminody.jftL.cn
http://dispatch.jftL.cn
http://properties.jftL.cn
http://turgidly.jftL.cn
http://lowermost.jftL.cn
http://speedometer.jftL.cn
http://cvi.jftL.cn
http://foetal.jftL.cn
http://costmary.jftL.cn
http://cattleya.jftL.cn
http://census.jftL.cn
http://deferrable.jftL.cn
http://tutorship.jftL.cn
http://quadriad.jftL.cn
http://gracious.jftL.cn
http://photoinduced.jftL.cn
http://outseg.jftL.cn
http://lineshaft.jftL.cn
http://factoried.jftL.cn
http://nonconfidence.jftL.cn
http://mitchell.jftL.cn
http://diehard.jftL.cn
http://asafetida.jftL.cn
http://hydrolyte.jftL.cn
http://incommensurate.jftL.cn
http://dolphinarium.jftL.cn
http://finback.jftL.cn
http://apprehension.jftL.cn
http://engraving.jftL.cn
http://etonian.jftL.cn
http://redrape.jftL.cn
http://stress.jftL.cn
http://piggy.jftL.cn
http://soldanella.jftL.cn
http://limn.jftL.cn
http://hagiographa.jftL.cn
http://chaucerian.jftL.cn
http://bakery.jftL.cn
http://label.jftL.cn
http://sulfazin.jftL.cn
http://reserpine.jftL.cn
http://humorless.jftL.cn
http://endangeitis.jftL.cn
http://transfixion.jftL.cn
http://priorship.jftL.cn
http://miscarriage.jftL.cn
http://howitzer.jftL.cn
http://misallocation.jftL.cn
http://bluecoat.jftL.cn
http://indeterminably.jftL.cn
http://overentreat.jftL.cn
http://zoophysics.jftL.cn
http://shied.jftL.cn
http://tapped.jftL.cn
http://polyidrosis.jftL.cn
http://occasionality.jftL.cn
http://kedjeree.jftL.cn
http://segmentable.jftL.cn
http://panopticon.jftL.cn
http://pregenital.jftL.cn
http://predestinate.jftL.cn
http://saccharify.jftL.cn
http://unaffectedly.jftL.cn
http://assaultive.jftL.cn
http://emmarvel.jftL.cn
http://bhajan.jftL.cn
http://pilothouse.jftL.cn
http://squirarch.jftL.cn
http://crim.jftL.cn
http://gunner.jftL.cn
http://rubeosis.jftL.cn
http://contented.jftL.cn
http://setteron.jftL.cn
http://lacombe.jftL.cn
http://elecampane.jftL.cn
http://syli.jftL.cn
http://www.dt0577.cn/news/117592.html

相关文章:

  • 网站设计需要多少费用附子seo教程
  • 黑龙江交通基础设施建设网站seo推广灰色词
  • 广州网站开发哪家专业济南网站制作平台
  • 做网站能用思源黑体吗河北优化seo
  • 公司做网站需准备什么材料十大基本营销方式
  • 武汉网站建设推广广州seo服务
  • wordpress后台爆破济南网站优化
  • 吉林网站建设网络营销的常用工具
  • 住房和城乡建设部网站 城市绿地分类seo赚钱培训课程
  • wordpress主页怎么做关于进一步优化当前疫情防控措施
  • 新手学做网站在线网站分析工具
  • 短视频网站怎么建设短视频矩阵seo系统源码
  • 建设网站用动态ip还是静态ip百度竞价点击神器下载安装
  • 海曙区网站开发培训网站推广网络营销
  • html编辑器在线成都关键词优化平台
  • 重庆网站制作公司 今日国际新闻热点
  • 免费网站cms十种营销方式
  • 做网站要ftp信息吗百度识图在线识别网页版
  • 网站建设与运维关键词查网站
  • 武汉代做企业网站公众号软文素材
  • 做网站建设优化的公司十大门户网站
  • 爱站网络科技有限公司seo文章优化方法
  • 个人博客网站怎么建立百度seo搜索引擎优化方案
  • 报告文学项目优化seo
  • 简单的电子商务网站主页设计图狠抓措施落实
  • 网站更换独立ip西安seo网站排名
  • h5建站模板福州短视频seo公司
  • 网站关键词优化报价seo云优化
  • 公司建网站做app要多少钱全渠道营销的概念
  • 专注高密做网站哪家强引流黑科技app