diff --git a/Activity2.png b/Activity2.png deleted file mode 100644 index 0abb052..0000000 Binary files a/Activity2.png and /dev/null differ diff --git a/Activity3.png b/Activity3.png deleted file mode 100644 index eab7079..0000000 Binary files a/Activity3.png and /dev/null differ diff --git a/Activity3_Alphabetical.js b/Activity3_Alphabetical.js deleted file mode 100644 index 8ed2c85..0000000 --- a/Activity3_Alphabetical.js +++ /dev/null @@ -1,5 +0,0 @@ -function Alphabetical(string)// function that will process the string. - { -return string.split('').sort().join(''); // splitting the words into letter{split}, and then sorting them out in an alphabetical order{sort}, and combined them again but in a sorted position{join}. - } -console.log(Alphabetical("qwertyuiop"));// use the function to a word. diff --git a/Activy2_Capitalized.js b/Activy2_Capitalized.js deleted file mode 100644 index aa941b7..0000000 --- a/Activy2_Capitalized.js +++ /dev/null @@ -1,11 +0,0 @@ -function uppercase(str) //the function that will be used to capitalized the strng -{ - var crntarray = str.split(' '); //the current array with the splitted original element - var newarray = []; //array for new string(capitalized) - for(var i = 0; i < crntarray.length; i++) //loop that will execute every indexes in an array - { - newarray.push(crntarray[i].charAt(0).toUpperCase()+crntarray[i].slice(1)); //replacing the first letter with capital letter then copying it to a new array - } - return newarray.join(' ');// will combine every element into a string. -} -console.log(uppercase("coding is hard but having enough practice will help you a lot.")); // calling the function to convert the original string. \ No newline at end of file