code review
- don't forgot closing and opening
<html>
and<body>
tags. - keep proper indentation of html and js code.
bad
<body>
<div id="frame" style="width:600px">
<p style="text-align: center;"> a-value slider</p><div id="aslider">
</div>
</div></body>
good
<body>
<div id="frame" style="width:600px">
<p style="text-align: center;"> a-value slider </p>
<div id="aslider"></div>
</div>
</body>
- Avoid needlessly defining your variables globally
bad
xdomain = [-6,6];
p = .8;
a = .4;
binCount = 50;
rec = null;
good
var xdomain = [-6,6];
var p = .8;
var a = .4;
var binCount = 50;
var rec = null;
-
don't create new files for different versions. use git to create a branch if you want to work on two variations of the same file. If all you want is to keep the old version just in case, git is already doing this every time you commit. If you want to name a particular commit to easily refer to it later, use
tags
. you probably dont know what I'm talking about so google it or ask me later. -
your use of commas is inconsistent. either always use them, or never use them. If you pick the latter, know when they're not optional