Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
const fruits = ["Peach", "Mango", "Apple", "Orange", "Grapes", "Strawberries"]
const myFavoriteFruits = fruits.slice(1, 4)
console.log(myFavoriteFruits) // Mango, Apple, Orange
// The original 'fruits' array was NOT modified
console.log(fruits) 
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x