JavaScript assignments - 1

mateja3m

Milan Matejic

Posted on April 7, 2021

JavaScript assignments - 1

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:

  1. 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));

💖 💪 🙅 🚩
mateja3m
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.

Related

Drum Kit - JavaScript project for begginers
javascript Drum Kit - JavaScript project for begginers

September 17, 2022

Youbified - Implementing a LiveStream API
livestreamapi Youbified - Implementing a LiveStream API

June 24, 2022

ES6: Object destructing
tutorial ES6: Object destructing

January 31, 2022

JavaScript assignments - 1
begginer JavaScript assignments - 1

April 7, 2021

5 useful javascript tricks for begginers.
javascript 5 useful javascript tricks for begginers.

February 20, 2021