• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

instanceOf() method

 
Mahalakshmi Chandru
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I have a doubt in the below code. Somebody please clarify:



Foo [ ].instanceOf(Foo, Bar, Face) -> false // correct
Foo [ ].instanceOf(Object) -> true // correct
Foo [ 1 ].instanceOf(Foo, Bar, Face, Object) -> true // how???
 
sebastian tortschanoff
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An ArrayObject of type Foo is just an Arry-Object, like this:



cause, you can't say, that the ArrayObject is a Foo, or Bar or Face

-> true

when the Object in Foo[1] is i.e. a Foo-Object

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic