Let's test your knowledge. Click the correct answer from the options.
What is the output of the following code?
JAVASCRIPT
1async function hello(){
2 try{
3 abc
4 return("Hello")
5 }
6 catch(error){
7 return("Boo! You have a " + error)
8 }
9}
10hello().then(value => console.log(value)).catch(error => console.log(error));
Click the option that best answers the question.
- ReferenceError: abc is not defined Boo! You have a
- ReferenceError: abc is not defined
- Boo! You have a ReferenceError: abc is not defined
- Boo! You have a NullPointerException: abc is not defined