title: How do I make the response object visible in specific events?
body: <p>I'm fairly new to nodeJS and I'm trying to enjoy myself by making a fully working login page.</p>
  
  <p><em>(And it works ! .. Well, kindof ..)</em></p>
  
  <p>I want the user to be redirected to another page with his data returned from the database after I press submit and eventually I found this thing while researching, which I don't think is a function but an event of some sort.</p>
  
  <p><code>req.on("end", (req, res) =&gt; {}</code></p>
  
  <p>The thing is however that the req and res objects are not visible inside there from the parent function.</p>
  
  <p>So here's my question. What is that thing, and how can I make it so that those two objects will be visible inside that "thing" ?</p>
  
  <p><code>function something(req,res){
     console.log(res) // [Object]
     req.on("end",(req,res)=&gt;{console.log(res); //undefined}
  }</code></p>