---
title: "Discussion on \"JavaScript ES12\" | Hashnode"
description: "Discussion on \"JavaScript ES12\". 1. 逻辑赋值运算符\n逻辑空赋值 (??=) \n逻辑与赋值 (&&=)\n逻辑或赋值 (||=)\nlet A // 当 A为 undefined 或者 null 时， ??= 赋值\nA ??= 12 // 12 \n\nlet B = 0 // 当 B为 Boolean(B) === false 时， ||= 赋值\nB ||= 12 // 12\n\nlet C = 12 // 当 C为 Boolean(C) === true 时， &&= 赋值\nC &&= 0 // 0\n\n2. String.repla..."
url: "https://hashnode.com/posts/javascript-es12/62621f83d82f4558aff868e2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript ES12](https://blog.lolis.top/javascript-es12?utm_source=hashnode&utm_medium=feed)

1\. 逻辑赋值运算符 逻辑空赋值 (??=) 逻辑与赋值 (&&=) 逻辑或赋值 (||=) let A // 当 A为 undefined 或者 null 时， ??= 赋值 A ??= 12 // 12 let B = 0 // 当 B为 Boolean(B) === false 时， ||= 赋值 B ||= 12 // 12 let C = 12 // 当 C为 Boolean(C) === true 时， &&= 赋值 C &&= 0 // 0 2. String.repla...

Apr 22, 2022 · 2 min read · blog.lolis.top  
Read the article

## Written by

[@lolis](https://hashnode.com/@lolis)

  
[View profile](https://hashnode.com/@lolis)

share something

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
