DEV Community

Discussion on: The JavaScript Comma Operator

Collapse
 
smlka profile image
Andrey Smolko

Hey=) there is my typical and dummy use of comma operator:

```const f = ()=>(value)
// wanna console.log value
const f = ()=>(console.log(value), value)



as you said comma execute all expressions and return top-right in the line
Enter fullscreen mode Exit fullscreen mode
Collapse
 
frontendtony profile image
Anthony Oyathelemhi

Clever