title: VBScript: Passing parameters to function
body: <p>I have 2 functions. I need to pass a parameter from one to another and evaluate it in 2nd function. For the below code I need "QA" in env but its printing it as "env" </p>
  
  <pre><code>strenv = "QA"
  cus_number = getNumber(strenv)
  
  If (IsNull(cus_number)) Then
      WScript.Echo "Number is null" 
  Else
   WScript.Echo "cus_number : " &amp; cus_number
  End If
  
  
  
   Function getNumber(strenv)
      wscript.echo "env: " &amp; strenv
      if strenv = "QA" Then
       number = "423"
      elseif strenv ="DEV" Then
        number= "678"
      endif
       getNumber=number
      End Function
  </code></pre>