Bug Tracker

Changes between Initial Version and Version 1 of Ticket #4913


Ignore:
Timestamp:
Jun 13, 2010, 9:36:57 AM (12 years ago)
Author:
dmethvin
Comment:

The unary plus operator converts a value to a number, or to NaN if the value isn't a number. I'll leave the ticket open for the bug.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4913

    • Property Component changed from unfiled to selector
    • Property Summary changed from Safari multiple class select fail. Also was does plus mean? to Safari multiple class select fail on disconnected elements
  • Ticket #4913 – Description

    initial v1  
    11I have one question and one problem.
    2 
    3 '''Question'''
    4 Does a plus in front of a variable do something special in javascript or is it there for a reminder or something?
    5 
    6 Example. In jQuery 1.3.2 in the function eq, it has +i.
    7 {{{
    8 eq: function( i ) {
    9 return this.slice( i, +i + 1 );
    10 },
    11 }}}
    12 It's also in the now function. With return +new Date;
    13 
    142
    153'''Problem'''
     
    3422}}}
    3523
     24'''Question'''
     25Does a plus in front of a variable do something special in javascript or is it there for a reminder or something?
     26
     27Example. In jQuery 1.3.2 in the function eq, it has +i.
     28{{{
     29eq: function( i ) {
     30return this.slice( i, +i + 1 );
     31},
     32}}}
     33It's also in the now function. With return +new Date;
     34
     35
    3636Thank you for your help.