Initial commit
This commit is contained in:
24
14-arrays/06-comparing-arrays/03-comparability/main.go
Normal file
24
14-arrays/06-comparing-arrays/03-comparability/main.go
Normal file
@ -0,0 +1,24 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
func main() {
|
||||
// these two arrays not comparable
|
||||
// their types are different
|
||||
|
||||
// uncomment all the code below and observe the error
|
||||
|
||||
// a := [3]int{6, 9, 3}
|
||||
// b := [2]int{6, 9}
|
||||
|
||||
// you can't ask this question
|
||||
|
||||
// if a == b {
|
||||
// fmt.Println("they're equal!")
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user