Решение:
var Calc = function(eq) { // variables defined here }; Calc.prototype=function() { // function defined here... return{ // public members } }();
var Calc = function(eq) { // variables defined here }; Calc.prototype=function() { // function defined here... return{ // public members } }();