js array functions
<script>
let res, array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
//first is an array method that returns the first element of an array.
res = first(array);
res = first(array, 5);
//last is an array method that returns the last element of an array.
last(array);
//The uniq array returns a new modified array without duplicates.
uniq(array);
</script>