exists
checks whether an item with the specified ID exists
function exists( // the ID of an item id: number|string): boolean
Returns
Section titled “Returns”boolean
returns true if the item exists. Otherwise, false
Example
Section titled “Example”var id = 3;if(view.exists(id)){ // true or false view.select(id); /* other logic */}