๐Type Assertions WorkshopWORKSHOP
1
2
3
4
Step 1
Write a `toString` function that takes an `any` argument and returns the string value if it's a string, or `"not a string"` if not. Use the two-value form `s, ok := v.(string)`.
โ Enter (Mac) ยท Ctrl+Enter (Win/Linux)