7e1ca958d9114f37e2c7f"><p>Returns a sequence containing all but the given number of final
elements.</p>
<p>The sequence must be finite. If the number of elements to drop exceeds
the number of elements in the sequence, the result is an empty
sequence.</p>
<pre><code class="language-swift">let numbers = [1, 2, 3, 4, 5]
print(numbers.dropLast(2))
// Prints &quot;[1, 2, 3]&quot;
print(numbers.dropLast(10))
// Prints &quot;[]&quot;
</code></pre>
<ul>
<li>Parameter n: The number of elements to drop off the end of