forked from tasneemalhaj/warmUp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw4Warmup2.js
6 lines (6 loc) · 835 Bytes
/
w4Warmup2.js
1
2
3
4
5
6
// 1. Create a HTML file, add 3 text fields to it next to each other, 1 button below them, 1 headline below the button
// 2. Create a JS file and connect it to the HTML
// 3. Create a CSS file and link it to the HTML
// 4. Create a function in the JS file that takes a number from the first and the third text fields and takes (+, -, *, /) from the second text field, then it calculates the operation and changes the headline to the result.
// 5. The function should change the color of the headline to green if the result is smaller than 100, to blue if it’s equal to or larger than 100 and to red if the input in the first or the third text fields is not a number and if the second text field is not one of the 4 operations (wrong inputs)
// 6. Style the HTML elements in the CSS file as you see fit and center them in the webpage