<script> let arr = [1,2 ,3]; arr.pop(); // output - [1,2] </script>
<script> let arr = [1,2 ,3]; arr.shift(); // output - [2,3] </script>
<script>
let colors =[ 'red', 'green', 'blue' ];
let newArr = colors.filter(item => item !== 'green');
console.log(newArr)
</script>
<script> let arr = [1,2 ,3]; arr.splice(1,1); // output - [1,3] </script>
<script>
let colors =[ 'red', 'green', 'blue' ];
colors.splice(colors.indexOf('green'), 1)
console.log(colors)
</script>