Announcement

Collapse
No announcement yet.

create an array for Mirth usage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • create an array for Mirth usage

    Is there any difference in these two javascript lines?

    var myArray = ["hello", "world"];

    var myArray = new Array("hello", "world");

  • #2
    Yes; the second line would explicitly call the constructor on the Array prototype, whereas the first line is using the internal initialiser to form an ArrayLiteral. For more info: http://www.ecma-international.org/pu...s/Ecma-262.htm
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      That is a great ECMA manual, but how do I decide which one to use in Mirth?

      Comment


      • #4
        Originally posted by StickyBandit View Post
        That is a great ECMA manual, but how do I decide which one to use in Mirth?
        I suppose it depends on whether you necessarily want the constructor to be explicitly called or not.
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment

        Working...
        X