Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30604 > unrolled thread
| Started by | "R.Wieser" <address@not.available> |
|---|---|
| First post | 2016-06-02 09:54 +0200 |
| Last post | 2016-06-03 23:55 +0200 |
| Articles | 19 — 5 participants |
Back to article view | Back to comp.lang.javascript
try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 09:54 +0200
Re: try ... catch for a specific error ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-06-02 11:21 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 12:18 +0200
Re: try ... catch for a specific error ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-06-02 13:22 +0200
Re: try ... catch for a specific error ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-02 12:38 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 14:32 +0200
Re: try ... catch for a specific error ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-02 14:40 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 15:40 +0200
Re: try ... catch for a specific error ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-02 16:03 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 16:23 +0200
Re: try ... catch for a specific error ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-02 16:43 +0200
Re: try ... catch for a specific error ? Tim Streater <timstreater@greenbee.net> - 2016-06-02 20:42 +0100
Re: try ... catch for a specific error ? Tim Streater <timstreater@greenbee.net> - 2016-06-02 20:44 +0100
Re: try ... catch for a specific error ? JJ <jj4public@vfemail.net> - 2016-06-02 20:24 +0700
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-02 16:35 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-03 10:50 +0200
Re: try ... catch for a specific error ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-03 17:35 +0200
Re: try ... catch for a specific error ? "R.Wieser" <address@not.available> - 2016-06-03 22:25 +0200
Re: try ... catch for a specific error ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-06-03 23:55 +0200
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 09:54 +0200 |
| Subject | try ... catch for a specific error ? |
| Message-ID | <574fe5c6$0$5901$e4fe514c@news.xs4all.nl> |
Hello all, I'm executing a command which can return a specific error constant indicating the item is not found. I would like to catch that error alone (returning an empty string instead of failing), and have the system handle all others. Two seperate questions: 1) Can I tell the "catch" to only do so on (a) specific error(s) ? if not than: 2) how can I ... a) compare the error constant against the "err" object (it does not seem to expose it) b) tell the system to handle/continue with the errors I have not handled myself. Regards, Rudy Wieser
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2016-06-02 11:21 +0200 |
| Message-ID | <XnsA61B73815550eejj99@194.109.6.166> |
| In reply to | #30604 |
"R.Wieser" <address@not.available> wrote on 02 Jun 2016 in
comp.lang.javascript:
> Hello all,
>
> I'm executing a command which can return a specific error constant
> indicating the item is not found. I would like to catch that error alone
> (returning an empty string instead of failing), and have the system handle
> all others.
>
> Two seperate questions:
> 1) Can I tell the "catch" to only do so on (a) specific error(s) ?
>
> if not than:
>
> 2) how can I ...
>
> a) compare the error constant against the "err" object (it does not seem
to
> expose it)
>
> b) tell the system to handle/continue with the errors I have not handled
> myself.
Try..catch seems to me for "inspecific" errors,
not for an "executed command" [what is that, btw?]
returning a specific value hat you interpret as an error-vallue.
Why not just:
var myErrorConstant = myExecutedCommand();
if (myErrorConstant != 0)
console.log('myErrorConstant=' + myErrorConstant);
or
var myErrorConstant = myExecutedCommand();
if (myErrorConstant != 0)
alert('myErrorConstant=' + myErrorConstant);
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 12:18 +0200 |
| Message-ID | <575007af$0$5841$e4fe514c@news.xs4all.nl> |
| In reply to | #30605 |
Evertjan,
> "executed command" [what is that, btw?]
An attempt of a generic description for calling something that returns data.
In this specific case its calling method of an object (but could be as
easily be a function).
> Why not just:
>
> var myErrorConstant = myExecutedCommand();
Thats because the "myExecutedCommand()" is not mine (have no control over)
and does not return an error, but throws it (hence the need for a "try ...
catch" wrapping).
Regards,
Rudy Wieser
-- Origional message
Evertjan. <exxjxw.hannivoort@inter.nl.net> schreef in berichtnieuws
XnsA61B73815550eejj99@194.109.6.166...
>
> Try..catch seems to me for "inspecific" errors,
> not for an "executed command" [what is that, btw?]
> returning a specific value hat you interpret as an error-vallue.
>
> Why not just:
>
> var myErrorConstant = myExecutedCommand();
>
> if (myErrorConstant != 0)
> console.log('myErrorConstant=' + myErrorConstant);
>
> or
>
> var myErrorConstant = myExecutedCommand();
>
> if (myErrorConstant != 0)
> alert('myErrorConstant=' + myErrorConstant);
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2016-06-02 13:22 +0200 |
| Message-ID | <XnsA61B882027DA1eejj99@194.109.6.166> |
| In reply to | #30606 |
"R.Wieser" <address@not.available> wrote on 02 Jun 2016 in comp.lang.javascript: >> Why not just: >> >> var myErrorConstant = myExecutedCommand(); > > Thats because the "myExecutedCommand()" is not mine (have no control over) > and does not return an error, but throws it (hence the need for a "try ... > catch" wrapping). Okay. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-06-02 12:38 +0200 |
| Message-ID | <nip2aa$lvc$1@solani.org> |
| In reply to | #30604 |
On 02.06.2016 at 09:54, R.Wieser wrote:
> I'm executing a command which can return a specific error constant
> indicating the item is not found. I would like to catch that error alone
> (returning an empty string instead of failing), and have the system handle
> all others.
>
> Two seperate questions:
> 1) Can I tell the "catch" to only do so on (a) specific error(s) ?
You can do something like:
try {
// ...
} catch (ex) {
if (weAreInterestedInHandlingTheException(ex)) {
// handle the exception
} else {
throw ex;
}
}
--
Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 14:32 +0200 |
| Message-ID | <5750271d$0$5837$e4fe514c@news.xs4all.nl> |
| In reply to | #30608 |
Christoph,
> You can do something like:
...
> throw ex;
Thanks, I was not aware that I could re-throw the origional error like that.
But that leaves my a) question: how do I compare the, in my case being the
NS_ERROR_NOT_AVAILABLE error-constant, to the returned "ex" object ?
Documentation as provided by
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obj
ects/Error does not mention such a property ...
Regards,
Rudy Wieser
-- Origional message
Christoph M. Becker <cmbecker69@arcor.de> schreef in berichtnieuws
nip2aa$lvc$1@solani.org...
>
> You can do something like:
>
> try {
> // ...
> } catch (ex) {
> if (weAreInterestedInHandlingTheException(ex)) {
> // handle the exception
> } else {
> throw ex;
> }
> }
>
> --
> Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-06-02 14:40 +0200 |
| Message-ID | <nip9et$h5d$1@solani.org> |
| In reply to | #30612 |
On 02.06.2016 at 14:32, R.Wieser wrote: >> You can do something like: > ... >> throw ex; > > Thanks, I was not aware that I could re-throw the origional error like that. > > But that leaves my a) question: how do I compare the, in my case being the > NS_ERROR_NOT_AVAILABLE error-constant, to the returned "ex" object ? > Documentation as provided by > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obj > ects/Error does not mention such a property ... Most likely for a good reason: this error constant appears to be highly user-agent specific. I would try my best to avoid messing with such a constant, and indeed concentrate on the root cause: why is something (what?) not available in the first place? -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 15:40 +0200 |
| Message-ID | <575036d4$0$5889$e4fe514c@news.xs4all.nl> |
| In reply to | #30613 |
Christoph, > Most likely for a good reason: this error constant appears to be > highly user-agent specific. Its not about that specific constant (regard it as an example), but about how I compare *any* error-constant to the returned error/exception object. Can I check if a specific error has been thrown, and if so how ? As for that constant being rather user-agent specific ? JavaScript isn't only used in webpages. :-) Regards, Rudy Wieser -- Origional message: Christoph M. Becker <cmbecker69@arcor.de> schreef in berichtnieuws nip9et$h5d$1@solani.org... > > Most likely for a good reason: this error constant appears to be highly > user-agent specific. I would try my best to avoid messing with such a > constant, and indeed concentrate on the root cause: why is something > (what?) not available in the first place? > > -- > Christoph M. Becker >
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-06-02 16:03 +0200 |
| Message-ID | <nipeap$4db$1@solani.org> |
| In reply to | #30615 |
On 02.06.2016 at 15:40, R.Wieser wrote: >> Most likely for a good reason: this error constant appears to be >> highly user-agent specific. > > Its not about that specific constant (regard it as an example), but about > how I compare *any* error-constant to the returned error/exception object. > Can I check if a specific error has been thrown, and if so how ? You can apply the usual comparison operators, typeof, instanceof etc. Note that JavaScript allows objects and scalar values to be thrown. For your concrete case see JJ's response (<news:yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net>). > As for that constant being rather user-agent specific ? JavaScript isn't > only used in webpages. :-) Indeed, I should have written "host environment specific". -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 16:23 +0200 |
| Message-ID | <57504110$0$5945$e4fe514c@news.xs4all.nl> |
| In reply to | #30616 |
Christoph, > Indeed, I should have written "host environment specific". ... and even that its doesn't matter in the slightest I'm afraid. And it would also be even less usefull as a designation, as "host" can be used for both an OS, a browser and, with a little bit of will, even for a webpage ... > > Can I check if a specific error has been thrown, and if so how ? > > You can apply the usual comparison operators, typeof, instanceof etc. I'm sorry, but thats a rather unspecific, and as such unusable reply. :-( Thanks for trying though. Regards, Rudy Wieser -- Origional message: Christoph M. Becker <cmbecker69@arcor.de> schreef in berichtnieuws nipeap$4db$1@solani.org... ... > > Can I check if a specific error has been thrown, and if so how ? > > You can apply the usual comparison operators, typeof, instanceof etc. > Note that JavaScript allows objects and scalar values to be thrown. > > For your concrete case see JJ's response > (<news:yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net>). > > > As for that constant being rather user-agent specific ? JavaScript isn't > > only used in webpages. :-) > > Indeed, I should have written "host environment specific". > > -- > Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-06-02 16:43 +0200 |
| Message-ID | <nipgmv$dae$1@solani.org> |
| In reply to | #30617 |
On 02.06.2016 at 16:23, R.Wieser wrote: >> Indeed, I should have written "host environment specific". > > ... and even that its doesn't matter in the slightest I'm afraid. > > And it would also be even less usefull as a designation, as "host" can be > used for both an OS, a browser and, with a little bit of will, even for a > webpage ... Well, the ECMAScript specification[1] says: | ECMAScript is an object-oriented programming language for performing | computations and manipulating computational objects within a host | environment. So "host environment specific" seems appropriate. [1] <http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-06-02 20:42 +0100 |
| Message-ID | <020620162042241390%timstreater@greenbee.net> |
| In reply to | #30617 |
In article <57504110$0$5945$e4fe514c@news.xs4all.nl>, R.Wieser <address@not.available> wrote: >> You can apply the usual comparison operators, typeof, instanceof etc. > >I'm sorry, but thats a rather unspecific, and as such unusable reply. :-( Why did you not pay attention to, and look at, the other bit of Christoph's response? >> For your concrete case see JJ's response >> (<news:yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net>). -- Lady Astor: "If you were my husband I'd give you poison." Churchill: "If you were my wife, I'd drink it."
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-06-02 20:44 +0100 |
| Message-ID | <020620162044228496%timstreater@greenbee.net> |
| In reply to | #30620 |
In article <020620162042241390%timstreater@greenbee.net>, Tim Streater <timstreater@greenbee.net> wrote: >In article <57504110$0$5945$e4fe514c@news.xs4all.nl>, R.Wieser ><address@not.available> wrote: > >>> You can apply the usual comparison operators, typeof, instanceof etc. >> >>I'm sorry, but thats a rather unspecific, and as such unusable reply. :-( > >Why did you not pay attention to, and look at, the other bit of >Christoph's response? > >>> For your concrete case see JJ's response >>> (<news:yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net>). Ah, now I see you did look at that. Ignore my noise. -- "The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary." -- James Nicoll, rasfw
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2016-06-02 20:24 +0700 |
| Message-ID | <yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net> |
| In reply to | #30612 |
On Thu, 2 Jun 2016 14:32:47 +0200, R.Wieser wrote:
> Christoph,
>
>> You can do something like:
> ....
>> throw ex;
>
> Thanks, I was not aware that I could re-throw the origional error like that.
>
> But that leaves my a) question: how do I compare the, in my case being the
> NS_ERROR_NOT_AVAILABLE error-constant, to the returned "ex" object ?
> Documentation as provided by
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obj
> ects/Error does not mention such a property ...
That is Firefox's XPCOM generated exception. Its object specifications is
not part of any web standards.
If you really need to check that, read the exception object's "name"
property. It's a string type value. e.g.
try {
//...
} catch(e) {
if ("function" === typeof e.QueryInterface) { //if XPCOM exception...
if (e.name === "NS_ERROR_NOT_AVAILABLE") {
console.log("XPCOM Error: Not available");
}
}
}
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-02 16:35 +0200 |
| Message-ID | <575043d5$0$5945$e4fe514c@news.xs4all.nl> |
| In reply to | #30614 |
JJ,
> > the NS_ERROR_NOT_AVAILABLE error-constant
...
> That is Firefox's XPCOM generated exception.
That looks to be correct, as it's returned thrown by one of its objects
methods. :-)
> If you really need to check that, read the exception
> object's "name" property.
...
> if (e.name === "NS_ERROR_NOT_AVAILABLE") {
Ah! The constant is thus infact a string, not a value. That explains it.
Thank you. :-)
And thanks for the full code, showing how you can also check the object that
actually threw the error. Although I assume that the error constants are
unique enough that that is not needed (especially not in my direct case
where the try .. catch wraps a single method call) its good to know.
Regards,
Rudy Wieser
-- Origional mesage:
JJ <jj4public@vfemail.net> schreef in berichtnieuws
yua8gzzjdwv9$.z2ar9grudtz1$.dlg@40tude.net...
>
> That is Firefox's XPCOM generated exception. Its object specifications is
> not part of any web standards.
>
> If you really need to check that, read the exception object's "name"
> property. It's a string type value. e.g.
>
> try {
> //...
> } catch(e) {
> if ("function" === typeof e.QueryInterface) { file://if XPCOM
exception...
> if (e.name === "NS_ERROR_NOT_AVAILABLE") {
> console.log("XPCOM Error: Not available");
> }
> }
> }
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-03 10:50 +0200 |
| Message-ID | <5751446c$0$5887$e4fe514c@news.xs4all.nl> |
| In reply to | #30618 |
Stefan, > When a string is not a value, what does ECMAScript > mean by »String value«, then? You're asking the wrong person I'm afraid. I know what *I* regard as a value (especially in that line of mine you quoted), but have no clue how the ECMAScript documentation writers have choosen to define it. But as you have mentioned it, what value does »String value« in the above have over simply »String« ? Also, how is »String value« different to »String data« or even »String contents« ? In other words: if I can replace that "value" word at that place with a few others, and even leave it out altogether without devaluing the meaning of what is left, can you than say that it actually has any meaning in there ? Or if you want to approach it from the other side: If in »String value« the important word is "value" and the word "string" is used to specify a certain subtype of the former, than what do you default to as type when you just see »value« mentioned ? If you know, than why do you get confused when you see someone (the ECMAScript documentation writers) use a whole other kind of value type ? And its even possible that the meaning of the word "value" is dependant on the context its used in ... Like when "string value" obtains a meaning if used in conjunction with the word "string", where the latter doesn't actually refer to a series of alphanumerical characters, but to a container (normally referred to as a "variable") holding them. I hope that this reply is of any value to you :-) Regards, Rudy Wieser -- Origional message: Stefan Ram <ram@zedat.fu-berlin.de> schreef in berichtnieuws value-20160602230913@ram.dialup.fu-berlin.de... > "R.Wieser" <address@not.available> writes: > >The constant is thus infact a string, not a value. > > When a string is not a value, what does ECMAScript mean > by »String value«, then? For example, > > »ECMAScript does not place any restrictions or requirements > on the sequence of code units in a String value,« > > ECMAScript 2015, 6.1.4 >
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-06-03 17:35 +0200 |
| Message-ID | <nis83k$t37$1@solani.org> |
| In reply to | #30624 |
On 03.06.2016 at 10:50, R.Wieser wrote: >> When a string is not a value, what does ECMAScript >> mean by »String value«, then? > > You're asking the wrong person I'm afraid. > > I know what *I* regard as a value (especially in that line of mine you > quoted), but have no clue how the ECMAScript documentation writers have > choosen to define it. See <http://www.ecma-international.org/ecma-262/5.1/#sec-4.3.16>. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2016-06-03 22:25 +0200 |
| Message-ID | <5751e75b$0$5868$e4fe514c@news.xs4all.nl> |
| In reply to | #30624 |
Stefan, > The expression »String« can have several meanings: Yep, just as my last paragraph tried to make clear to you. :-) > so »a String value« is more clear. Nope, as string cannot be a value* and vice verse. Combining those words causes only causes confusion. Now if you would have suggested one of the other names I mentioned ... *though ofcourse a string can *represent* a value. > »String data« might be a representation of each > ECMAScript code point by two bytes, for example. By the same feat "string value" might be a representation of string holding a text rresentation of a number, which in turn ofcourse represents a value. Which means you cannot use that combination of words either. (hint: if you want to "win" a discussion than do not use an argument when it can be turned around and used against you :-) Also, do not conjure stuff up.) > Without looking it up in ECMAScript, I only know > what the first expression means by heart. Good for you. You have memorised a combination of words to have a certain meaning within ECMAScript. Applause. The problem is that you do seem to be attacking me for *not* recognising that combination of words. Why ? > A »value« is a value of an unspecified type, I'm sorry ? We *are* talking about JavaScript here aren't we ? That language that only works with strings and values (and yes, I'm "forgetting" objects there) ? > there is no »default type« for the interpretation of the > word »value«. Wrong, even within the context of scripting. Just ask someone what "the value" of a numeric variable is. They will not hesitate to tell you the value of the number it holds. Try the same while pointing at a variable holding a string, and they will probably tell you it doesn't have any (or trying to auto-convert a string representing a number to its value :-) ). But I think I'm going to end our conversation here, as it leads to nothing. Goodbye, Rudy Wieser -- Origional message: Stefan Ram <ram@zedat.fu-berlin.de> schreef in berichtnieuws String-20160603182944@ram.dialup.fu-berlin.de... > "R.Wieser" <address@not.available> writes: > >But as you have mentioned it, what value does »String value« in the above > >have over simply »String« ? > > The expression »String« can have several meanings: > > - a constructor function by the name of »String«, > - a string literal, or > - a string value, > > so »a String value« is more clear. > > (But even if »string« alone would already be clear, > it would still be a value in ECMAScript.) > > >Also, how is »String value« different to »String data« or > >even »String contents« ? > > Without looking it up in ECMAScript, I only know what the > first expression means by heart. > > »String data« might be a representation of each ECMAScript > code point by two bytes, for example. > > >In other words: if I can replace that "value" word at that place with a few > >others, and even leave it out altogether without devaluing the meaning of > >what is left, can you than say that it actually has any meaning in there ? > > (See above.) > > >If in »String value« the important word is "value" and the word "string" is > >used to specify a certain subtype of the former, than what do you default to > >as type when you just see »value« mentioned ? > > A »value« is a value of an unspecified type, there is no > »default type« for the interpretation of the word »value«. > > >If you know, than why do you get confused when you see > >someone (the ECMAScript documentation writers) use a whole > >other kind of value type ? > > (I don't know, so the consequence and therefore the question > does not apply.) >
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2016-06-03 23:55 +0200 |
| Message-ID | <XnsA61CF34D88B02eejj99@194.109.6.166> |
| In reply to | #30627 |
"R.Wieser" <address@not.available> wrote on 03 Jun 2016 in comp.lang.javascript: > Nope, as string cannot be a value* and vice verse. Combining those words > causes only causes confusion. Now if you would have suggested one of the > other names I mentioned ... Nonsense. In scripting, the value is the content of a variable [or a constant]. This value can be an integer, a floating-point number, a string, an empty string, empty itself, infinite [pos or neg], null, undefined, true, false, or even an array or other object. If you value only numbers, then surely the number zero is not a value? Welcome to the world of scripting and other high level computer languages. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web