Question: ```
[ $var -eq $val ]

```

What will be the value of `$?` after the above condition/test if it fails? Can I assume that it will **always** be `1`?

Edit: After reading answers I realized my question wasn't precise. I meant "will it be always `1` if no error occurs?".

Answer: 
You are probably better off creating a struct to hold your values. Then your array would be an array of that struct.

```
struct homIcon {
    var iconImg: UIImage
    var Operator: String
    var oprCode: String
    var oprMerchCode:String
}

var setHomIconArray:[homIcon] = []

let newHomIcon = homIcon(iconImg: img!, Operator: "Strin", oprCode: "Hello", oprMerchCode: "Huja")

setHomIconArray.append(newHomIcon)

```
As Nirav says, the syntax you are using creates an array of tuples. If you want a dictionary get rid of the parentheses.

You want to define key/value pairs using this syntax:

```
var aDict = [key:value, key:value, key:value] 

```

Then you can add new key/value pairs using:

```
aDict[newKey] = newValue

```

Is your goal to create and use a dictionary, or is it your goal to user and understand the structure that you found on the net?