0
>= 18?
Hello, Link is below. One of the bonus questions was to write a simple code to see if someone was 18 or older. var adult => 18; console.log(adult == 20); https://www.sololearn.com/learning/1024/1132/1385/2 Not sure why, but I keep getting an error message? Any help appreciated.
4 Antworten
+ 2
Maybe you mean like this?
var adult = 20;
console.log(adult >= 18);
= is used for assignment of variables and values.
== > < >= <= are used for comparisons.
+ 2
Please tag relevant programming language.
java !== javascript
Thank you.
+ 1
Thanks Vivek and Nicko12,
-Half way there.
-The formula says okay for large numbers and not small or vice versa?
-I messed around again, but couldn't find anything.
-Anymore ideas?
-I'll be sure to post with the correct tag this time too.
https://www.sololearn.com/learning/1024/1132/1385/2
0
Thanks for your help, solution is below (I was making it too difficult and only had to write the final portion in the form of a console.log statement:)).
https://www.sololearn.com/learning/1024/1132/1385/1