JavaScript. Cubic regression

(added to JavaScript stunts FAQ)