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_Alphabetical.js b/Activity3_Alphabetical.js index 8ed2c85..2f6a246 100644 --- a/Activity3_Alphabetical.js +++ b/Activity3_Alphabetical.js @@ -2,4 +2,4 @@ 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. +console.log(Alphabetical("qwertyuiop"));// use the function to a word. \ No newline at end of file diff --git a/Activity4.png b/Activity4.png deleted file mode 100644 index fb06361..0000000 Binary files a/Activity4.png and /dev/null differ diff --git a/Activity4_Less.js b/Activity4_Less.js deleted file mode 100644 index b5e03d0..0000000 --- a/Activity4_Less.js +++ /dev/null @@ -1,20 +0,0 @@ -function Lessthan18(arr_num) // function that is used to find the number in array that is less than 18. -{ - arr_num.sort(function(x,y) // sorting the values - { - return x-y; - }); - - var narray = [arr_num[0]]; //this array is utilized to store the numbers - - - for(var j=1; j < arr_num.length; j++) // loop is used to run the if statement in every indexes - { - if(arr_num[j] < 18) // if statement that will evaluate the numbers if they are less than 18 - { - narray.push(arr_num[j]); // storing the true values - } - } - return narray.join(',');// combining the true values - } -console.log(Lessthan18([19,22,33,4,55,7,88,9,10])); // utilizing the function in the console. \ No newline at end of file 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