What happens when you assign a variable to another variable?
- The variables become the same variable
- Assignee variable gets deleted
- Variable's value is changed to the assigned variable's value CORRECT
Which one is a correct assignment statement?
opened := true
closed := trueopened = falseCORRECTvar x = 2
Which one is a correct assignment statement?
a, b = 3; 5c, d = true, falseCORRECTa, b, c = 5, 3
Which one is a correct assignment?
var (
n = 3
m int
)
m = "4"n = 10CORRECTn = truem = false
Which one is a correct assignment?
var (
n = 3
m int
f float64
)
// one of the assignments below will be here
fmt.Println(n, m, f)
n, m = 4, fn = falsen, m, f = m + n, n + 5, 0.5CORRECTn, m = 3.82, "hi"
Which one is a correct assignment statement?
var (
a int
c bool
)
a = _c, _ = _, false_, _ = a, cCORRECT
Which one is a correct assignment?
REMEMBER: path.Split returns two string values
var c, f string
_ = path.Split("assets/profile.png")_, _, c = path.Split("assets/profile.png")f = path.Split("assets/profile.png")_, f = path.Split("assets/profile.png")CORRECT