Home | Community | Message Board


Mycohaus
Please support our sponsors.

General Interest >> Science and Technology

Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Jump to first unread post. Pages: 1
OfflineMHbound
Ballin Out At All Cost
Male

Registered: 09/24/07
Posts: 6,512
Loc: Under The Rainbow
Last seen: 6 months, 13 days
Javascript help
    #11293718 - 10/21/09 07:25 PM (8 years, 4 days ago)

So, I'm doing some homework for a friend and usually its writing code but he sent this shit and its definitions and what not...Problem is I don't know the definitions just how to code to some degree...

If you know the answer to any of these and would be kind enough to answer it for me I would really appreciate it.

1 The best way to develop and maintain a large program is to construct it from small, simple pieces called ________.
a) scripts
b) modules
c) scriptlets
d) objects

2 The technique of developing and maintaining a large program by constructing it from small, simple pieces is called ________.
a) divide and conquer
b) modular programming
c) multitasking
d) multiprogramming

3 Functions that are not provided as part of the JavaScript language are called ________ functions.
a) add-on
b) programmer-defined
c) man-made
d) extra

4 The “prepackaged” functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.
a) subroutines
b) routines
c) methods
d) functions

5 All variables declared in function definitions are ________.
a) global variables
b) local variables
c) static variables
d) constant variables

6 Functions are invoked by writing the name of the function, followed by the function's ________ enclosed in parentheses.
a) name
b) static variables
c) arguments
d) constant variables

7 Function definitions often contain ________, which are considered to be local variables and correspond with the arguments in the function call.
a) parameters
b) static variables
c) register variabless
d) constant variables

8 Which of the following is a legal function call for the function definition provided below?
function square( y )
{
return y * y;
}
a) square(7+2);
b) (7).square;
c) square(7,2);
d) square 7;

9 What is the result of writing the keyword var in a function parameter list?
a) The parameter following the keyword would have global scope.
b) The parameter following the keyword would have local scope.
c) The parameter following the keyword would become a static variable.
d) The result would be a JavaScript runtime error.

10 What would the function cube return, assuming it is called with the statement cube( 3 )?
function cube( y );
{
return y * y * y;
}
a) JavaScript runtime error
b) 3
c) 9
d) 27

11 What does the following statement do?
Math.floor( Math.random() * 12 );
a) This creates a random number from 0 up to and including 12.
b) This creates a random number from 0 up to but not including 12.
c) This creates a random number from 1 up to and including 12.
d) This creates a random number from 1 up to but not including 12.

12 The value a in the following statement is called the ________ and the value b is called the ________.
face = Math.floor( a + Math.random() * b );
a) scaling factor, shifting value
b) shifting value, scaling factor
c) scaling value, shifting factor
d) shifting factor, scaling value

13 If the XHTML form game has a text field named point in it, what is the proper way to set the text associated with point to 10?
a) game.point = "10"
b) game.point.text = "10"
c) game.point.caption = "10"
d) game.point.value = "10"

14 Giving a local function variable the same name as a global variable will result in which of the following?
a) The local variable will “hide” the global variable.
b) JavaScript runtime error.
c) Data corruption.
d) The local function variable will rename itself.

15 Which of the following are valid names of scopes in JavaScript?
a) Local
b) Global
c) Variable
d) a and b

16 Which of the following is not a global function? a) parseInt
b) escape
c) square
d) eval

17 JavaScript references the ________ object for you when you call its functions, so you don’t need to use it directly.
a) document
b) local
c) scriptlevel
d) Global

18 A function that calls itself either directly or indirectly through another function is called a ________ function.
a) base case
b) iterative
c) recursive
d) fibonacci

19 When a function invokes a new copy of itself, it is called a ________.
a) base case
b) final step
c) base case
d) recursive call

20 Iteration uses ________ statements and recursion uses ________ statements.
a) counter - recursive, counter - iterative
b) repetition, function calling
c) repetition, selection
d) function calling, repetition


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


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinedkamp18
The Real World


Registered: 07/06/07
Posts: 894
Last seen: 7 years, 4 months
Re: Javascript help [Re: MHbound]
    #11293902 - 10/21/09 07:49 PM (8 years, 4 days ago)

1.d
2.b
3.b
4.d
5.b
6.a
7.a
8.a
9.d
10.d
11.a
12.d
13.d
14.a
15.d
16.b?
17.a
18.b
19.d
20.b


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinedkamp18
The Real World


Registered: 07/06/07
Posts: 894
Last seen: 7 years, 4 months
Re: Javascript help [Re: dkamp18]
    #11293912 - 10/21/09 07:50 PM (8 years, 4 days ago)

been working in java, for the last 3 years so it's been a little while since i really looked at javascript.

but it's still in my blood. lol


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineMHbound
Ballin Out At All Cost
Male

Registered: 09/24/07
Posts: 6,512
Loc: Under The Rainbow
Last seen: 6 months, 13 days
Re: Javascript help [Re: dkamp18]
    #11293913 - 10/21/09 07:50 PM (8 years, 4 days ago)

Thanks!

Are you pretty sure about your answers?


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


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinedkamp18
The Real World


Registered: 07/06/07
Posts: 894
Last seen: 7 years, 4 months
Re: Javascript help [Re: MHbound]
    #11294101 - 10/21/09 08:16 PM (8 years, 4 days ago)

pretty much positive. i wont guarantee 100% just to save us both the grief lol.

but i guarantee higher than 90%


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineMHbound
Ballin Out At All Cost
Male

Registered: 09/24/07
Posts: 6,512
Loc: Under The Rainbow
Last seen: 6 months, 13 days
Re: Javascript help [Re: dkamp18]
    #11294112 - 10/21/09 08:17 PM (8 years, 4 days ago)

Ok, +5 for you...Thanks for your help


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


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinedkamp18
The Real World


Registered: 07/06/07
Posts: 894
Last seen: 7 years, 4 months
Re: Javascript help [Re: MHbound]
    #11294145 - 10/21/09 08:22 PM (8 years, 4 days ago)

no problem, let me know how it goes. gotta make sure i am not too out of touch 

:wink:


Post Extras: Print Post  Remind Me! Notify Moderator
Jump to top. Pages: 1

General Interest >> Science and Technology

Similar ThreadsPosterViewsRepliesLast post
* Coders... I need a little javascript help! illustrain 449 4 02/15/08 06:36 PM
by illustrain
* my simple programming questions thread (javascript + html) stefan 577 3 04/28/08 06:43 PM
by stefan
* javascript key bindings JT 377 3 01/27/09 07:56 AM
by JT
* Javascript errors, in both IE & Firefox. Any ideas?? mushroomhunter10 550 11 09/18/09 10:28 PM
by mushroomhunter10
* Re-install Javascript Blastrid 828 8 06/20/04 04:13 PM
by Blastrid
* Javascript Help
MHbound
309 2 08/28/09 06:32 PM
by MHbound
* --- EntheogenicPeace 551 2 01/04/07 07:03 PM
by EntheogenicPeace
* Graphing sin, cos functions through excel *DELETED* PJDIDDLE 4,466 9 10/18/06 12:10 PM
by skydog

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: Lana, trendal, automan
6,782 topic views. 0 members, 2 guests and 2 web crawlers are browsing this forum.
[ Toggle Favorite | Print Topic | Stats ]
Search this thread:
Original Seeds Store - Cannabis Seeds
Please support our sponsors.

Copyright 1997-2017 Mind Media. Some rights reserved.

Generated in 0.024 seconds spending 0.003 seconds on 16 queries.