Null coalescing operator angular 2
What is the equivalent of null coalescing operator (??) in angular 2.
In C# we can perform an operation:
string str = name ?? FirstName :"First Name is null";
Coalescing is performed via ||
operator, ie
let str:string = name || FirstName || "name is null and FirstName is null";
You can also read this question for more details and explanations.
链接地址: http://www.djcxy.com/p/73374.html下一篇: 空合并运算符角2