开发者

What does if(file.is_image) mean in JavaScript?

开发者_JAVA百科

And what would be the equivalent for sound?


Sounds like somebody created a custom type and is_image is one of its members.

My guess would be that it is checking to see if the file is an image file and returning true if it is and false if it isn't.


Javascript object file is defined somewhere in one of the scripts run by this certain page. And is_image is its member (most probably a Boolean property).

The statement actually means one of these:

  • if (file.is_image is defined at all) then do something or
  • if (file.is_image is true) then do something
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜