分配值后面的感叹号:A = B! C [英] Exclamation mark behind assigned value: A = B ! C

查看:95
本文介绍了分配值后面的感叹号:A = B! C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读公司的javaScript编码,发现了以下内容:

I am reading piece of company javaScript cods and I found the following:

seriesCode = pageRecord.getProperty('seriesCode')!'XXX' 

这是否意味着如果第一个值为NULL,第二个应该放在seriesCode中?

Does this mean that if first value is NULL the second on should be placed in seriesCode?

推荐答案

类似于FreeMarker模板语言,是的,!运算符出现在操作数的右侧时,如果左侧的表达式为默认值是null或对缺失变量的引用.

Looks like FreeMarker template language, and yes, the ! operator, when appears on the right side of an operand gives a default value if the left side expression is null or a reference to a missing variable.

这篇关于分配值后面的感叹号:A = B! C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆