DEV Community

Cover image for 6 Interesting JavaScript Questions You Should Know

6 Interesting JavaScript Questions You Should Know

Chris1993 on August 02, 2022

As the primary development language for front-end developers, JavaScript itself has a relatively simple syntax and a well-developed ecosystem, whic...
Collapse
 
idodav profile image
Ido David

You post is great and I was really surprised by the first example with the try catch
You have an error in the third example with the object in the last code block
you wrote

let f2 = () => ({});
f2(); // undefined
Enter fullscreen mode Exit fullscreen mode

It should be

let f2 = () => ({});
f2(); // {}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
chris1993 profile image
Chris1993

thinks 😄

Collapse
 
zhouyg profile image
zhou-yg

like something terrible in javascript

Collapse
 
chris1993 profile image
Chris1993

😁😁

Collapse
 
tibabit profile image
Vikash Kesarwani

Interesting