Javascript – I'm working on alternating the case of a string
(for example asdfghjkl to AsDfGhJkL). function toWeirdCase(string){ var chars = string.toLowerCase().split(""); for (var i = 0; i < chars.length; i += 2) { chars[i] = chars[i].toUpperCase(); } return chars.join(""); }; I tried this but it does not account for the…