mirror of https://github.com/01-edu/public.git
3cdfd1a34c | ||
---|---|---|
.. | ||
README.md |
README.md
What else ?
The else
keyword
It allows to execute alternative code if the condition do not match:
if (isEnough) {
console.log('this is enough :)')
} else {
console.log('I want more !!')
}
it is like an if
but you don't have a condition, just add a scope after {}
and write code !
Instructions
You must check if 'George Clooney'
is included in the provided array vips
if he is, console.log
the string 'What else ?'
otherwhise log
'The only failure is not to try.'