Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with these questions

    I have some homework questions for my javascript class. Ive looked so hard for the answers in the book to no avail. So Here are the questions...If you could just answer as many as you can..even if its just one or 2 Id REALLY appreciate it



    1. Which term represents the data type that consists of positive or negative numbers with no decimal places? Integer or Floating point??

    2. Which statement is correct in reference to the following code?
    var firstQuarter=new array();
    firstQuarter[1]=”February”;
    a. Because element 0 was never assigned a value, this code is incorrect.
    b. Element 0 will have a value of undefined.
    c. The code is correct
    d. This code forces element 0 to be deleted. It can not be assigned a value at a later date.
    3. What are the operands in the following code segment?
    count = 150;
    a. count and 150
    b. the equal sign (=)
    c. count
    d. 150
    4. what will be the output from the following code segment?
    var result;
    var problem = 37 % 7;
    document.write(‘<p> The value of result is “+ problem +”.</p>);
    5. what is the value of this?
    var x =1;
    var y = ++1;
    I think its 2..am I right??
    6. what is the escape sequence for inserting a null character into a literal string??

    7. all of the following choices are a valid return values for the typeof operator except (number, string, function, null)

    8. what is the correct syntax to assign a numeric value to a variable??

    9. when trying to perform a calculation with a nonnumeric operand, the javascript interpreter does what??

    10. what does the JS interpreter look for to indicate the end of a string??

    11. the lines that make up a function are called the what??

    12. what is the correcnt syntax to declare a function called first_quarter with a parameter of months?

    13. What is the code that invokes a function called?

    14. a variable that is declared inside a function and is only available within the function in which it is declared is said to be …………… ?
    15. what happens when a program contains a global and a local variable with the same name??

    16. what is the value of returnValue in the following statement??

    var returnValue = eval(“10 + 5”);
    17. what is the value of returnValue in the following statement?
    var returnValue=eval(“Good Morning”);

    18. which of the following statements uses the correct syntax to display a confirm dialog box?
    a. var confirmOrder(“Is your order correct?”):
    b. var confirmOrder= [“Is your order correct?”];
    c. var confirmOrder = (“Is your order correct?”);
    d. var confirmOrder{“Is your order correct?”};
    19. what happens when a matching label is found in a switch statement?

    20. each repetition of a loop is called a ………….

    21. which of the following uses the correct syntax to receive a value stored in totalCost? The value is being returned by a function named grandTotal into a variable named discountValue.
    a. discountValue = grandTotal(totalcost);
    b. discountValue=grandTotal;
    c. discountValue = totalCost:
    d. grandTotal(totalCost)=discount(value)

  • #2
    New Coder
    Join Date
    Jan 2007
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You will not learn if we tell you the answers.

    Are you allowed to use the examples on a computer to see the outputs?

    You can google a lot of the questions.
    Floating point + javascript etc

  • #3
    Regular Coder
    Join Date
    Jan 2007
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well I dont think you have looked, no offence but the very first question would be answered in the book for sure! in fact the question practicly tells you the answer

    After looking again at the questions they would ALL be answered in the book, you need to read the questions and then look at select words, for example the third question asks what is the operand, so you know to look in the book for operands and there WILL be a list its as simple as matching a picture to a picture!!!!
    Matthew Bagley
    Paramiliar Design Studios
    Website Design | Website Development | Search Engine Optimisation (SEO)

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,240
    Thanks
    203
    Thanked 2,554 Times in 2,532 Posts
    I think it might be said that if you have attended a JavaScript class and yet are unable to answer these rather basic questions even with the assistance of a text book, then possibly you ought to consider moving over to some other course more in line with your capabilities.


  •  

    Posting Permissions

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