You can declare multiple variables with one var statement but you have to close every command with an ; ! Its possible to leave it but i wouldnt (there are good examples out there:
//not good but should work:
var a,b
function c(){}
//the best solution:
var a,b;
function c(){};
//what you did
var a,b,function c(){};
//wich is invalid
solved Why won’t my variables display? It’ve always worked fine [closed]