at backyard

Color my life with the chaos of trouble.

Entries from 2022-09-04 to 1 day

JavaScriptの三項演算子に関する、どうでもいいメモ書き

例えばこんな文字列を出力したいとする。 const isInvalid = true; `is invalid: ${isInvalid ? true : false}` 結果は下記のような文字列となる。 is invalid: true だが、下記のようにすると、結果は true となる。 const isInvalid = true; "is invalid: …