diff options
Diffstat (limited to 'usth/ICT3.2/prac/2/3.js')
-rw-r--r-- | usth/ICT3.2/prac/2/3.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usth/ICT3.2/prac/2/3.js b/usth/ICT3.2/prac/2/3.js new file mode 100644 index 0000000..45bd66e --- /dev/null +++ b/usth/ICT3.2/prac/2/3.js @@ -0,0 +1,5 @@ +const WEIGHT = Math.trunc(Math.random() * 10); +const GUESS = Math.trunc(Number( + prompt('Guess the weight of the marrow (1-10)'))); + +alert(GUESS == WEIGHT ? 'Good Work' : 'Not Matched'); |