ワンライナーで書きたい
const isAdmin = true;
if (isAdmin) deleteAllUser();
短絡評価を使う
const isAdmin = true;
isAdmin && deleteAllUser();
「...if文の方が可読性ええな」
More than 5 years have passed since last update.
const isAdmin = true;
if (isAdmin) deleteAllUser();
const isAdmin = true;
isAdmin && deleteAllUser();
「...if文の方が可読性ええな」
Register as a new user and use Qiita more conveniently