phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

PhET-style variable declarations #33

Closed jonathanolson closed 9 years ago

jonathanolson commented 9 years ago

Declarations of the form:

var a = 5,
  b = 6,
  c = 7;

should be changed to

var a = 5;
var b = 6;
var c = 7;

to match our coding guidelines. It helps to be able to quickly rearrange by swapping lines, delete lines, and add variables faster, and is a bit easier to read.

jonathanolson commented 9 years ago

An example of this is in updateAccelerationVector() in Pendulum.js, but please look for other cases.

andrey-zelenkov commented 9 years ago

Change variable declarations to PhET-style. Reassign to @jonathanolson for verification.

jonathanolson commented 9 years ago

Looks good, thanks!