1. Alphabet Pyramid Task: Write a function alphabet Pyramid that takes a number and prints a pyramid
of letters up to i rows.
A
AB
ABC
ABCD
Console.log(Pyramid(5) -->
2. Reverse Words in a Sentence
Task: Write a function reverseWords that reverses the order of words in a sentence but keeps the words
themselves unchanged.
console.log(reverseWords("JavaScript is fun")); // "fun is JavaScript"
Count Vowels in a String Task: Write a function countVowe l s that counts the number of vowels (a, e, i, o, u) in a given string. console.log(countVowels("Hello World")); // 3
4. Reverse an Array Without Using reverse Task: Write a function reverseArray that returns a new array with elements in reverse order. console.log(reverseArray([1, 2, 3, 4, 5]));