Slice Copies
Slice Copies
slice returns a new array containing part of the original. It does not remove items from the original array.
Your task: Create coreTopics from the first three items in allTopics. Log the copied section and keep allTopics unchanged.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Slice Copies
slice returns a new array containing part of the original. It does not remove items from the original array.
Your task: Create coreTopics from the first three items in allTopics. Log the copied section and keep allTopics unchanged.