This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
VowelCount is javascript function which takes string as input | |
return count of vowels available or 0 if no vowels available | |
*/ | |
const VowelCount = (str) =>{ | |
const vowelArray = ['a', 'e', 'i', 'o', 'u']; | |
let counter = 0; | |
for (let i = 0; i < vowelArray.length; i++) { | |
for (let j = 0; j < str.length; j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ReverseString(str) take the str parameter being passed and return the string in reversed order. | |
For example: if the input string is "Hello World and Coders" | |
then your program should return the string sredoC dna dlroW olleH. | |
*/ | |
const ReverseString = (str) => { | |
let reversedString = ""; | |
for (let i = str.length - 1 ; i >= 0; i--) { | |
reversedString = reversedString + str[i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ExpressionMatcher is take the str parameter being passed | |
and return "Expression Matched" or "Expression Not Matched" | |
@param {string} str | |
@param {array} openExpArr <optional> | |
default value ['[', '{', '('] | |
@param {array} closeExpArr <optional> | |
default value [')', '}', ']'] | |
@returns |