Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for 002 (0.03 sec)

  1. doc/go1.17_spec.html

    Otherwise, <code>append</code> re-uses the underlying array.
    </p>
    
    <pre>
    s0 := []int{0, 0}
    s1 := append(s0, 2)                // append a single element     s1 == []int{0, 0, 2}
    s2 := append(s1, 3, 5, 7)          // append multiple elements    s2 == []int{0, 0, 2, 3, 5, 7}
    s3 := append(s2, s0...)            // append a slice              s3 == []int{0, 0, 2, 3, 5, 7, 0, 0}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 10 18:25:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
Back to top