in reply to A comparison of Perl vs. JavaScript -- a reference table.
In Perl, you can access the command line through the @ARGV array. In BASIC, you can do it from COMMAND$ and there's a way to do it in JavaScript as well, but it varies depending on the application. For example in a HTA program, you would do it like this:
<HTA:APPLICATION ID="objTestHTA" ...>
</HEAD>
<SCRIPT>
alert( objTestHTA.commandLine );
</SCRIPT>
If you happen to write JavaScript for Node.js environment, then you'd use an array called process.argv to access the commandline arguments...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A comparison of Perl vs. JavaScript -- a reference table.
by LanX (Saint) on Dec 15, 2020 at 03:56 UTC | |
by choroba (Cardinal) on Dec 15, 2020 at 17:28 UTC | |
by LanX (Saint) on Dec 15, 2020 at 17:44 UTC | |
by choroba (Cardinal) on Dec 15, 2020 at 17:46 UTC | |
by LanX (Saint) on Dec 15, 2020 at 19:42 UTC |