Ad
Strings
Data Types

Your task is to remove every second char in a string.

Example:

removeEverySecond('hello world'); // 'hlowrd'
removeEverySecond('how you doing') // 'hwyudig'
function removeEverySecond(str) {
  return [...str].filter((_,i) => !(i%2)).join``;
}