Check if object is an array


I have an object and want to check if it's an Array object.


// Initialize the array

let arr = [1,2,3]

// Check if 'arr' is an Array

if arr is Array {
    print("Yes, it's an Array")


Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)