LoginSignup
0
0

More than 3 years have passed since last update.

JavaScriptで,文字列のNull or 空判定

Last updated at Posted at 2019-12-09

JavaScriptで,文字列のNull or 空判定

やりたかったこと

jsで,ある変数にNullが入っていたら,分岐させる.

結果

変数hogeに値が入っていたら,処理実施.

if (hoge) {
 ...
}

変数hogeに値が入っていなかったら,処理実施.

if (!hoge) {
 ...
}
0
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
0
0