I'm a total latex noob, I would like to accomplish something similar to what has been asked here, but rather than resuming numbering from where it was left off, I'd like to pass the new line number as argument to the \Reactivatenumber command. Sort of like this:
\documentclass{article}
\usepackage{listings}
\lstset{numbers=left,numberblanklines=false,escapeinside=||}
\let\origthelstnumber\thelstnumber
\makeatletter
\newcommand*\Suppressnumber{%
\lst@AddToHook{OnNewLine}{%
\let\thelstnumber\relax%
\advance\c@lstnumber-\@ne\relax%
}%
}
\newcommand*\Reactivatenumber{%
\lst@AddToHook{OnNewLine}{%
\let\thelstnumber\origthelstnumber%
\advance\c@lstnumber\@ne\relax}%
}
\makeatother
\begin{document}
\begin{lstlisting}
var myFunc = function() {|\Suppressnumber|
//my function does many great things
//and it's only 10 lines long!|\Reactivatenumber{12}|
}
\end{lstlisting}
\end{document}
To produce something like this (pardon formatting):
1 | var myFunc = function() {
| //my function does many great things
| //and it's only 10 lines long!
12 | }
What would be the right way to define the \Reactivatenumber command? Cheers.

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – jub0bs Dec 06 '14 at 16:08|\Reactivatenumber{12}|which is my desiderata, how I'd like to change the command in order to do what I'd like it to. Cheers. – Andrea Aloi Dec 06 '14 at 16:39