|
@@ -125,6 +125,13 @@
|
|
|
var v1 = list.pop(); // pop 100
|
|
|
var v2 = list.pop(); // pop 50
|
|
|
</code></pre>
|
|
|
+
|
|
|
+ <h4 class="section-h4">List Contains</h4>
|
|
|
+ <p>The List class implements the contains methods as a convenient way to check for the existance of a value in a list:</p>
|
|
|
+ <pre><code class="swift">
|
|
|
+ var list = [1, 2, "Hello", 3.1415, true];
|
|
|
+ return list.contains(3.1415); // Returns: true
|
|
|
+ </code></pre>
|
|
|
</div> <!-- /row -->
|
|
|
</div> <!-- /main-content -->
|
|
|
</div> <!-- /container -->
|