The Comma Operator in JavaScript


The comma operator will execute the series of expressions and returns the last one. Let’s look at the below functions “print_hello()”, “print_world()” and “print_js()”.

This code:

will execute all the three functions and returns the value of “print_js()” to the variable output.

You may also like

Sponsored

Follow me

Popular posts