开发者

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

开发者 https://www.devze.com 2023-01-26 19:15 出处:网络
开发者_JAVA百科And what would be the equivalent for sound?Sounds like somebody created a custom type and is_image is one of its members.
开发者_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

精彩评论

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

关注公众号