title: Javascript: Display the content of a line knowing its number
body: <p>I'm working on a JavaScript application and I'm trying to fix an error, but I can't find it. Here's what I have.</p>
  
  <pre><code> function my_function (txt) {
      try {
          return eval('('+ txt + ')');
      }
      catch(e) {
        alert(e.lineNumber);
        return eval(txt);
      }
  </code></pre>
  
  <p>I'm passing the content of a file to the function, and it seems like there is an issue in this file. The problem is this line</p>
  
  <pre><code>          alert(e.lineNumber);
  </code></pre>
  
  <p>always returns the same number even when I add lines at the beginning of the file so I want to make sure I'm editing the right line. For that I want it to show the content of the line that contains the error.</p>
  
  <p>Please help me.</p>