When To use Colon ":" In Javascript?

Discussion in 'JavaScript' started by saadi123, Apr 26, 2010.

  1. #1
    I want to know that when colons ":" are used in javascript?
    Please if possible, try to explain it through examples.
     
    saadi123, Apr 26, 2010 IP
  2. drknght

    drknght Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Colons are used in a number of places within JavaScript - in object literals (JSON notation), with the javascript pseudoprotocol to invoke a function when a link is clicked, and in switch-case statements. Which particular usage are you concerned about?

    ~drknght
     
    drknght, Apr 26, 2010 IP