<script> let resolution = ['one', 'two', 'three']; let arr = ['one', 'two', 'three', 'four', 'five']; console.log(arr.map(item => resolution.includes(item) ? item : 'other')) </script>