2
can I get help with this question please
ayaanHasan (2)

Write a function isOldEnough that takes an input called num as an argument. The function should return either true or false based on the following logic:

  1. It returns true if the number is greater than or equal to 18
  2. It returns false if the number is non-negative but less than 18
  3. It returns "Invalid argument" if the number is negative or if it's not a number at all
You are viewing a single comment. View All
4
a5rocks (501)

This is just a bunch of ifs. I'm sure you can do it.

1
ayaanHasan (2)

@a5rocks I am very new to this i am trying my best however there is something just wrong

1
mkhoi (178)

@ayaanHasan Can you send the code?

1
a5rocks (501)

@ayaanHasan what language are you making this for? I recommend googling / whatever-search-engine-you-use-ing for a tutorial on:

  • functions
  • if statements
  • how to get a variable's class