SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need serious help on these questions!

    JavaScript functions must be called:
    A. from the server
    B. implicitly
    C. explicitly
    D. A and C, but not B.
    E. None of the above.

    JavaScript commands written outside of a function will be executed:
    A. by the server.
    B. implicitly.
    C. explicitly.
    D. never, they are ignored.
    E. None of the above.

    The best loop for iterating through an array is
    A. Enhanced For loop
    B. While
    C. Do Until
    D. Do While.
    E. None of the Above.

    JavaScript Arrays are always passed to functions?
    A. By Reference.
    B. By Value.
    C. Globally.
    D. As a string.
    E. None of the Above.

    The best way to execute JavaScript code when you first bring up a page is:
    A. onload event
    B. JavaScript code outside of any function.
    C. onstart event.
    D. All of the above.
    E. None of the Above.



    Write a JavaScript function to handle a callback:

    Assume the following input fields:

    <input type="text" id="lastName" name="lastName" />
    <input type="text" id="firstName" name="firstName" />
    <input type="text" id="phone" name="phone" />
    <input type="text" id="email" name="email" />

    A callback function will receive a pipe delimited string from the server as such:

    Last-name|first-name|phone#|email

    Example: Doe|Jane|415-555-1212|jane.doe@gmail.com

    The callback function is:

    function customer_Callback ( content )
    {
    // use the split method to convert content to an array.
    // use document.getElementById() to get each of the above input fields.
    // populate from the array.
    }


    -----------------------------------------

    I am having serious trouble with these problems: Please help me, I beseech you!
    Last edited by paul_wilkins; Dec 15, 2011 at 02:52. Reason: removed inappropriate prize offer

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,707
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by RejectDeferDec15 View Post
    I am having serious trouble with these problems: Please help me, I beseech you! There will be a special prize to whoever answers correctly all these questions first. Thanks!
    It wouldn't be right or appropriate for us to do the equivalent of a homework assignment for you, so is there anything inparticular that you would like us to help you understand?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the difference between explicit and implicit? I can't seem to find the answer anywhere.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,707
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by RejectDeferDec15 View Post
    What's the difference between explicit and implicit? I can't seem to find the answer anywhere.
    That might be a potential clue as to the nature of the answer.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •