Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit a4081c6

Browse files
committed
💡 Fixing unshift documentation examples
1 parent a992b4a commit a4081c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/array/unshift.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import convertArrayMethod from './convertArrayMethod'
99
* @param {...*} values The values to add.
1010
* @return {Object} Returns the updated object.
1111
* @example <caption>Add one element.</caption>
12-
* push({ nested: { prop: [1, 2] } }, 'nested.prop', 3) // => { nested: { prop: [3, 1, 2] } }
12+
* unshift({ nested: { prop: [1, 2] } }, 'nested.prop', 3) // => { nested: { prop: [3, 1, 2] } }
1313
* @example <caption>Add several elements.</caption>
14-
* push({ nested: { prop: [1, 2] } }, 'nested.prop', 3, 4) // => { nested: { prop: [3, 4, 1, 2] } }
14+
* unshift({ nested: { prop: [1, 2] } }, 'nested.prop', 3, 4) // => { nested: { prop: [3, 4, 1, 2] } }
1515
* @see {@link https://mdn.io/Array.prototype.unshift|Array.prototype.unshift} for more information.
1616
* @since 0.1.7
1717
*/

0 commit comments

Comments
 (0)