Menu
Coddy logo textTech

Recap - String Weaver

Part of the Logic & Flow section of Coddy's JavaScript journey — lesson 5 of 65.

challenge icon

Challenge

Easy

Create a function named stringWeaver that takes two strings and returns a new string where:

  1. Ignore numbers as if they don't exist - Remove all numbers from both strings first
  2. Combine the cleaned strings - Put all characters from the first cleaned string, followed by all characters from the second cleaned string
  3. Convert all vowels to uppercase - In the final combined string

Return the final string. 

For example:

stringWeaver("web2024", "dev2025");
// Output: "wEbdEv"

stringWeaver("123hello", "456world");
// Output: "hEllOwOrld"

Try it yourself

function stringWeaver(str1, str2) {
    const vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'];
    const numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
    // Write your code here

}
// Do not write anything outside function

All lessons in Logic & Flow