• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

if condition in JS

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why if condition works for anything (not necessary boolean) in case of JS?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not ? So you can easily check if a reference exits or not.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sort of follows the C/C++ rules rather than Java rules.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic