LoginSignup
0
0

JavaScript 入力判定

Last updated at Posted at 2024-02-05

ユーザーが情報を入力しなかった場合の判定処理の例
||を使うことで、userInputがfalsyだった場合に表示される値を
設定できる

const userInput = '';
const userName = userInput || 'User'
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