Just return a function that will form the public interface:

function myClass(config)
{
  var pubif = function() {
    return pubif.method.apply(pubif, arguments);
  };
  pubif.config = config;
  pubif.method = function() { };

  return pubif;
}


The rest of the code remains the same.

JavaScript Equivalent Of PHP __invoke
Here's what I have, and I've hand drawn what I seeking:



I'm after (a) a double-ended arrow with the two ends pointing to the numerator and denominator of a fraction under a square root, and (b) an arrow pointing to the double-ended arrow labeled by an \otimes.

I'm typesetting old lecture notes in LaTeX and need to be as accurate as possible, so this is what I need to do.  But it doesn't strike as straightforward.

I tried using baseline in tikz, but it didn't come out symmetric, and I wouldn't even know where to begin with the arrow pointing to the double-ended arrow.

\documentclass{article}

\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\begin{equation*}
 \sqrt{\frac{N}{p(1-p)}}
\end{equation*}

\end{document}

