On Sep 4, 5:18 am, Станислав Анисимов <[EMAIL PROTECTED]> wrote: > Is't this a rigth way to define types: > 111 is Integer and Number > '111' is Number and String > 'a111' is String
Only `111` is a number primitive. The rest two are plain strings. To find out if a value can be type-converted into a number (as you seem to want to do), you might try something like: function canConvertToNumber(n) { return !isNaN(+n); }; -- kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---