100daysofcode [ Day - 01 ]
Today I've learned about Variables, Conditions & Function.
And I have made a function to Check Even or Odd Numbers.
For further actions, you may consider blocking this person and/or reporting abuse
Jackson Dhanyel Santin -
Louis Austke -
Yanaiara Oliveira -
InterSystems Developer -
Top comments (10)
Well done, another option would be :
(( number % 2 != 0 ) ? "This is a Odd number :)" : "this is a even number :)")
Good luck with #100daysofcode :) Gotta have guts, be brave!
I'm looking forward to see your progress.
Want to clarify in case OP doesn’t know: this refactoring is using the ternary operator :)
(Condition) ? CodeIfTrue : CodeIfFalse
Thank you for your suggestions bro. I will definitely try it next time.
No problem, I was where you were not long ago, it feels good to be able to understand a concept enough to pass it on!
It also takes the stress from If Statements haha
yes bro! 😊
It's a great pleasure to talk with you . And thank you for giving suggestions to code in standard way. I think your code is more standard and more professional. thank so much bro . I will definitely try it now .
suggest me to Improve more!!
Congratulations on starting the challenge. Good luck and let us know if you need any help. We are here to support you if you need it :)
A suggestion to go beyond today's lesson: look at the differences between
let
,const
, andvar
. Then consider: which one would fit better in today's code? and why?thank you very much for your suggestions . It's a great pleasure to talk with you and next time I will definitely try to do code with let, const ❤️❤️
Congratulations to start your journey.
I think it would be good to know the difference between the operator != and !==.
You can find it here
w3schools.com/js/js_comparisons.asp