On 28 March 2011 00:40, Olov Lassus <[email protected]> wrote:
> 2. + < <= >= >
> are restricted to primitive strings or numbers
> (but never a mix)
I don't see how you're enforcing this. What about:
function foo(x) {
return x < 5;
}
If foo is called without an argument x is undefined. This is a silly
example, but there are lots of cases where the type of a variable
can't be statically determined (which almost goes without saying, as
JS is dynamically typed). How do you ensure/check that the correct
types are used?
--
Nick Morgan
http://skilldrick.co.uk
@skilldrick
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]