Recap - String Weaver
Part of the Logic & Flow section of Coddy's JavaScript journey — lesson 5 of 65.
Challenge
EasyCreate a function named stringWeaver that takes two strings and returns a new string where:
- Ignore numbers as if they don't exist - Remove all numbers from both strings first
- Combine the cleaned strings - Put all characters from the first cleaned string, followed by all characters from the second cleaned string
- 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 functionAll lessons in Logic & Flow
1Strings In Depth
String FundamentalsIterate Over StringsTemplate LiteralsString MethodsRecap - String Weaver4JSON Part 2
Iterate Over JSONNested JSONJSON Optional ChainingShallow And Deep CopyRecap - Bicycle ShopRecap - Solar System10Manage Festival System
Project OverviewAdd Movies & Venues2Multi-dimensional Arrays
2D Arrays BasicsAccessing 2D Array ElementsNested Loops with 2D ArraysRecap - 2D ArraysMatrix Addition & SubstractionJagged Arrays3D Arrays And BeyondCommon 2D Array PatternsRecap - All About Arrays5Sets Part 1
What Is A Set?Iterating Over SetsAdding An ElementRemoving An ElementChecking If An Element ExistsSize And Is EmptyCopy And ClearRecap - Basic Of Sets8Arrays Interesting Topics
Array DestructuringSpread Syntax in ArraysSparse ArraysRecap - Arrays Workshop3JSON Part 1
What is a JSON?Check If Key ExistsObject MethodsThe Spread Operator Part 1The Spread Operator Part 2Remove KeysRecap - JSON Manipulate Keys