This branch is made for hometasks
1.ReverseString function
➡️ Task: Complete the reverseString function, it has one parameter s. You must perform the following actions:
- Try to reverse string s using the split, reverse, and join methods.
- If an exception is thrown, catch it and print the contents of the exception's message on a new line.
- Print s on new line. If no exception was thrown, then this should be the reversed string, if an exception was thrown, this should be the original string.
➡️ Solution
2.isPositive function
➡️ Complete the isPositive function below. It has one integer parameter a . If the value of a is positive, it must return the string YES. Otherwise, it must throw an Error according to the following rules:
- If a is 0, throw an Error with message = Zero Error.
- If a is negative, throw an Error with message = Negative Error.
➡️ Solution
4.Teacher's gradeLabs function
➡️ Trying teacher's function for all students, given in an array
➡️ Solution
5.Regexp for exactly 4 or 6 digits
➡️ Create a RegExp myRegExp to test if a string is a valid pin or not.
➡️ Solution
- Vanilla JavaScript
Tigran Yeranyan
Contributions, issues, and feature requests are welcome!
Give a ⭐️⭐️⭐️⭐️⭐️ if you like this project!