Comparing arrays in Go language

To compare two arrays use the comparison operators == or !=. Quoting from the link:

Array values are comparable if values of the array element type are comparable. Two array values are equal if their corresponding elements are equal.

As a 2D (or ND) array fits the above requirement, you can compare it in the same way.

The question “How deep is that comparison?” doesn’t make sense for arrays.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)