if (a == b) {
b = 1;
} else {
b = 2;
}
を
b = a == b ? 1 : 2;
と書き換えられる。
可読性の向上が期待できる。
Go to list of users who liked
More than 1 year has passed since last update.
if (a == b) {
b = 1;
} else {
b = 2;
}
を
b = a == b ? 1 : 2;
と書き換えられる。
可読性の向上が期待できる。
Register as a new user and use Qiita more conveniently
Go to list of users who liked