Forum Discussion

viverosm's avatar
viverosm
New Contributor
11 years ago

instance of operator for different Checkpoint types

Hello, I have an array of objects used in checkpoints and wanted to iterate over it and do different things based on the type of object (if it's a Table, do A, if it's a Region, do B). I am usi...
  • Philip_Baird's avatar
    11 years ago
    Hi Michael, as per the documentation here, instanceof is a native JScript operator that tests whether an object has in its prototype chain the prototype property of a constructor.


    Therefore, it will only work if the Table and Region Objects are native JScript Objects, which I would doubt.


     


    Also, how are you able to get an Array of Table and Region checkpoints, I could not find any way to achieve this.


     


    It may be that the error saying Table is undefined is being raised as Table does not exist as an Object.


     


    Regards,


    Phil Baird