That question really threw me. Until I realized you meant "through".
Anyway, I think you asked the wrong question.
Reason: When you pass a string as an argument to a function, you are really only passing a *REFERENCE* to the string. And a *REFERENCE* will surely be represented as a memory pointer of some kind, which means it will likely be a 4-byte or 8-byte pointer (or possible integer, as an index into heap space, but I tend to doubt that implentation would be used).
So the real question you are asking: What is the maximum length of a *STRING* in JavaScript?
The answer is surely both browser dependent and computer dependent.
Computer dependent because of course a string can't be longer than available memory on a given computer.
Browser dependent because it depends on how strings are implemented in a given browser.
Likely the theoretical maximum in most JavaScript implementations is 4 gigabytes or 2 gigacharacters, depending on implementation. Remember that all JavaScript strings are Unicode strings, so that normally means 2 bytes per character. (At least one source--at Google--says, though, that the maximum is about 512MB--or 256 megacharacters--for Chrome.)
But that's all kind of moot: The real limit will almost surely depend on how much space the operating system has allocated for the current browser. After all, the browser has to share memory space with all the other programs executing in your computer. Can the sum of the memory sizes exceed the amount of RAM in your computer? Sure. Heard of "virtual memory", haven't you? But in general the OS will want to try to make sure that all *active* applications are running in real memory.
In practice, if you can manage to make a string too large for a given browser, then your code isn't going to run very well, no matter what. So why are you trying to do this?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Likely the theoretical maximum in most JavaScript implementations is 4 gigabytes or 2 gigacharacters, depending on implementation. Remember that all JavaScript strings are Unicode strings, so that normally means 2 bytes per character. (At least one source--at Google--says, though, that the maximum is about 512MB--or 256 megacharacters--for Chrome.)
But that's all kind of moot: The real limit will almost surely depend on how much space the operating system has allocated for the current browser. After all, the browser has to share memory space with all the other programs executing in your computer.
V8 has a 1gb/instance default pool size, no matter how much RAM the device has. you can use command-line switches to alter that, but you shouldn't be needing that much ram, considering the async storage options available these days.
__________________ my site (updated 5/13) STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%