Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is a comma used before "contents" [duplicate]

I saw the following snippet in a jquery code, but I don't understand why it uses a comma right before 'contents' instead of a period.

var that = $(this),
contents = that.serialize();

Does anyone have an idea why a comma is being used?

I am missing the words to search properly I think.

like image 981
JSnewb Avatar asked Feb 02 '26 08:02

JSnewb


1 Answers

same as :

var that = $(this);
var contents = that.serialize();
like image 145
TecHunter Avatar answered Feb 04 '26 23:02

TecHunter