parameters: (script)
return_statement: return result
docstring: Run code in the JS interpreter and return output.
docstring_summary: Run code in the JS interpreter and return output.
docstring_tokens: Run code in the JS interpreter and return output .
function: def jseval(script):
      """Run code in the JS interpreter and return output."""
      try:
          interpreter = Popen(['js'], stdin=PIPE, stdout=PIPE)
      except OSError:
          return script
      result, errors = interpreter.communicate(script)
      if interpreter.poll() or errors:
          return script
      return result
function_tokens: def jseval ( script ) : try : interpreter = Popen ( [ 'js' ] , stdin = PIPE , stdout = PIPE ) except OSError : return script result , errors = interpreter . communicate ( script ) if interpreter . poll ( ) or errors : return script return result