JavaScript assignments - 1
Milan Matejic
Posted on April 7, 2021
In this series of blog posts I will write simple JavaScript assignments and solutions for them.
Main purpose of this posts is to practice JavaScript and develop problem solving thinking.
If you have a another solution, please write it in the comment.
Here is the first task:
- Write a program to check two numbers and return true if one of the numbers is 100 or if the sum of the two numbers is 100 */
const checkTwoNum = (a, b) => {
if (a === 100 || b === 100 || (a + b) === 100) {
return true;
} else {
return false;
}
};
//console.log(checkTwoNum(10,90));
💖 💪 🙅 🚩
Milan Matejic
Posted on April 7, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.