1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[JS] bool反転代入の書き方

1
Last updated at Posted at 2026-02-17
let torf = false;
torf ^= true;

私はJavascriptで書きましたが、not false === trueかつ可変長整数の言語であればビット反転代入をすることでbool反転代入の代わりになります。

以上ゴミ記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?