Clarify challenge title (#13719)
This commit is contained in:
parent
b6d7cc1d86
commit
38a96aa899
@ -232,7 +232,7 @@
|
||||
},
|
||||
{
|
||||
"id": "587d7b7a367417b2b2512b12",
|
||||
"title": "Copy an Array with slice()",
|
||||
"title": "Copy Array Items Using slice()",
|
||||
"description": [
|
||||
"The next method we will cover is <code>slice()</code>. <code>slice()</code>, rather than modifying an array, copies, or <em>extracts</em>, a given number of elements to a new array, leaving the array it is called upon untouched. <code>slice()</code> takes only 2 parameters — the first is the index at which to begin extraction, and the second is the index at which to stop extraction (extraction will occur up to, but not including the element at this index). Consider this:",
|
||||
"<blockquote>let weatherConditions = ['rain', 'snow', 'sleet', 'hail', 'clear'];<br><br>let todaysWeather = weatherConditions.slice(1, 3);<br>// todaysWeather equals ['snow', 'sleet'];<br>// weatherConditions still equals ['rain', 'snow', 'sleet', 'hail', 'clear']<br></blockquote>",
|
||||
|
Loading…
x
Reference in New Issue
Block a user