UNPKG
javascripting
Version:
latest (2.7.4)
2.7.4
2.7.3
2.7.2
2.7.1
2.7.0
2.6.3
2.6.2
2.6.1
2.6.0
2.5.0
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.12.0
1.11.1
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.9.1
1.9.0
1.8.0
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
Learn JavaScript by adventuring around in the terminal.
github.com/sethvincent/javascripting
javascripting
/
solutions
/
if-statement
/
index.js
7 lines
(6 loc)
•
183 B
JavaScript
View Raw
1
2
3
4
5
6
7
var
fruit =
'orange'
;
if
(fruit.
length
>
5
) {
console
.
log
(
'The fruit name has more than five characters.'
); }
else
{
console
.
log
(
'The fruit name has five characters or less.'
); }