Practical usage of if-else conditions in JavaScript
The variable month contains some
number in the interval from 1 to
12. Determine what time of the
year this month falls (winter, summer,
spring, autumn).
Given a string consisting of characters,
for example, 'abcde'. Check that
the first character of this string is the
letter 'a'. If so, print 'yes',
otherwise print 'no'.
A number is given, for example, 12345.
Check that the first character of this number
is 1, 2 or 3. If so, print
'yes', otherwise print 'no'.
Given a three-digit number. Find the sum of the digits of this number.
Given a 6-digit number. Check that
the sum of the first three digits is equal
to the sum of the second three digits. If
so, print 'yes', otherwise print
'no'.