?? Null Coalescing Operator --> What does coalescing mean?

前端 未结 7 2009
情歌与酒
情歌与酒 2020-12-01 20:16

I\'m tempted to lie and say that English is my second language, but the truth is that I just have no idea what \'Coalescing\' means. I know what ?? \'does\' in

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 21:02

    Here are some other definitions of coalesce that might help make sense. From Answers, it shows that it means to "grow together; fuse" or "to come together so as to form one whole." In other words, take a sequence of items and make one out of them. So considering that null in this discussion means "empty," coalescing null with a non-empty gives you the non-empty.

提交回复
热议问题