Tuesday 16 July 2013

oDesk Management Skills Test

Which motivation strategy is characterized by a high emphasis on performance and a low emphasis on satisfaction?

a. Indulging

b. Imposing

c. Integrating

d. Ignoring

Which of the following is neither a cash in-flow nor cash out-flow?

a. Rents received

b. Payments from debtors

c. Payments to creditors

d. Mortgage repayments

e. Depreciation

Which of the following best completes the sentence: "Repetitive decisions are known as _________ ."

a. operational decisions

b. programmed decisions

c. routine decisions

d. standard decisions

Mary Parker Follett defined management as: "the art of getting things done through __________."

a. money

b. influence

c. coercion

d. people

A Mission Statement: ____________.

a. provides information as to what the organization is trying to achieve.

b. outlines a task to be undertaken by a team.

c. summarizes the outcome of a project.

d. sets out the high-level structure of the organization.

Self-regulation, one of the characteristics of an effective leader, is defined as the ability to __________ .

a. understand one's own reactions and the effect of one's behavior on other team members.

b. control oneself and to reflect in complex situations.

c. maintain an ongoing commitment to a goal in often turbulent and chaotic times.

d. understand the complexities of other people's situations.

e. maintain teamwork in situations where uncertainty can isolate and drive people apart.

In which context are the terms Unfreezing and Refreezing used?

a. Management of Change

b. Management of Order

c. Dimensions of Order

d. Resistance to Change

e. Dimensions of Control

A manager is seeking to introduce new working conditions. Which of the following is the best way to gain employees' cooperation?

a. Send an email to the entire staff informing them of the new conditions.

b. Post the new instructions on a notice board.

c. Organize a briefing for the entire staff.

d. Discuss the proposals with staff representatives.



Which of the following characterise a 'differentiation'-based business model? 1.High sales volume
2.High profit margin
3.Well-regarded brand
4.High-quality manufacture

a. 1,2 and 4

b. 2, 3 and 4

c. 1, 3 and 4

d. 1, 2 and 3

e. All of the above

In which of the following circumstances is the directive method of introducing planned change inappropriate?

a. When the manager enjoys sufficient position power (e.g.: he/she has significant control over rewards and punishments).

b. When the employees are achievement-motivated and willing to accept the change.

c. If organization communication pattern is 'star-type', which favors the change agent as a leader over his subordinates.

d. When the driving forces far outweigh the restraining forces.

If the financial year starts in January, the Fixed Budget will be prepared ___________.

a. a month or two earlier

b. in January

c. at the end of that year

d. as and when the Financial Manager decides

Which of the following statements is false?

a. Decision-making should be based on evidence.

b. Decision-making should take into account a range of factors.

c. Decision-making should involve key stakeholders.

d. Decision-making should be rapid.

Which of the following types of costs is not typically 'variable':

a. Cost of raw materials

b. Cost of marketing

c. Cost of lighting

d. Cost of transportation

What is the main advantage of employing staff on a temporary basis?

a. Greater flexibility in responding to customer requirements

b. Improved productivity

c. Enhanced customer satisfaction

d. Lower staff turnover

Which of the following reveals whether or not a company is earning a profit?��

a. Income statement

b. Statement of cash reconciliation

c. Balance statement

d. Statement of cash flows

e. Statement of owners' equity

Which of the following can be used as a term for Supervisor?

a. Area manager

b. Specialty manager

c. Front-line manager

d. Technical manager

Which of the following represents the implementation of a 'Just-in-Time' production approach?

a. The installation of a new computer system.

b. Receiving materials as and when they are required for production.

c. Having a large supply of materials ready to be processed.

d. Implementing process controls to improve quality.

e. Introducing monitoring tools to assess efficiency

There are some important measures which a company can use to determine the effects of training. Which of the following is not one of them?

a. Production

b. Changes in specific results, such as turnover

c. Job applications

d. Profit of the company

e. Overall growth

The 'Principle of Order' applies to ______________.

a. one head and one plan

b. right person in right job

c. issuing instructions

d. justice and kindness

Which of the following is not a financial statement?

a. Statement of Financial Loss

b. Income Statement

c. Balance Sheet

d. Statement of Retained Earnings

e. Statement of Cash Flow

Which one of the following is another term for the Scalar Principle?

a. Span of Control

b. Unity of Direction

c. Unity of Command

d. Chain of Command

e. Personal ability

If a subordinate is having difficulty carrying out a delegated task, what should a manager do?

a. Take over the task for the employee so he or she will not become demoralized.

b. Be available as a role model and resource in identifying alternative solutions.

c. Give the employee a written warning.

d. Give the employee a second delegated task so he or she has another opportunity to prove his worth.

Which of the following constitutes a fixed asset in a business?

a. Creditors

b. Debtors

c. Stock

d. Fixtures and fittings

What is a 'stakeholder map'?

a. A means of plotting the location of customers.

b. A means of identifying all those affected by the organization.

c. A means of targeting your intended market.

d. A means of predicting sales growth.

Which one of the following best completes the sentence: "Division of work promotes ____________."

a. Effective management

b. Efficiency

c. Experience

d. Equality

Which of the listed management functions involves creating an environment where everyone works together to achieve the common goals of the organization?

a. Planning

b. Controlling

c. Leading

d. Recruiting

e. Organizing

Which one of the following best completes the sentence: The principle of 'Unity of Command' is concerned with __________.

a. activities

b. persons

c. remuneration

d. respect of authority

If a manager is attempting to establish motivational goals for his employees, which of the following should he do?

a. Involve subordinates in the goal-setting process

b. Set goals that are stated in very general terms

c. Set conflicting goals so employees can accomplish one goal or another as they choose

d. Set goals that are easy to achieve

What does the term 'Unity of Control' stand for under Principles of Organizing?

a. That there should be a limit to the number of persons that can be supervised effectively by one boss.

b. That each subordinate should have only one superior whose orders he has to obey.

c. That the line of authority from the chief executive at the top to the first line supervisor at the bottom must be clearly defined.

d. That the activities of the enterprise should be divided according to functions and assigned to persons according to their specialization.

In the 'situational' leadership style, the manager is concerned with ___________.

a. task accomplishment

b. human relations and teamwork

c. giving free rein to his/her staff

d. prompt, orderly performance

e. growth for staff and himself/herself

Long-term budgets are useful for those industries where the gestation period is long. Which of the following is not relevant to the above statement?

a. Machinery

b. Electricity

c. Textile

d. Engineering

In which order would the following strategic planning activities take place?



1.Evaluating performance
2.Devising strategy
3.Documenting plans
4.Executing plans

a. 2, 4, 3, 1

b. 4, 3, 1, 2

c. 3, 2, 1, 4

d. 4, 1, 3, 2

e. 2, 3, 4, 1

Why do businesses use cash-flow forecasts as part of the internal planning process?

a. To estimate the value of their assets at the year end.

b. To assess potential profit or loss.

c. To allocate the marketing budget.

d. To predict future borrowing requirements.

Which of the following is an external source of recruitment?

a. Promotion from within

b. Transfer of employees

c. Unsolicited applicants

d. Staff returning from maternity leave

An employee's desire and commitment to perform that is manifested in job related effort defines his/her _____________ .

a. aptitude

b. motivation

c. performance

d. ability

A tool for evaluating organizational performance across the full range of a business is known as a 'balanced __________'.

a. scorecard.

b. ledger.

c. matrix.

d. healthcheck.

The degree to which a company owns its upstream suppliers and its downstream buyers is known as _____________.

a. monopolization

b. vertical integration

c. specialization

d. diversification

Which term refers to a document that sets out an organization's 'rules' regarding a particular issue?

a. Process

b. Policy

c. Procedure

d. Practice

e. Paradigm

Which of the following is correctly ordered as a Management Process?

a. Staffing, Planning, Organizing, Directing, Co-ordinating, Controlling

b. Planning, Staffing, Organizing, Directing, Co-ordinating, Controlling

c. Planning, Organizing, Staffing, Directing, Co-ordinating, Controlling

d. Planning, Organizing, Staffing, Directing, Controlling, Co-ordinating

Which of the following reveals whether or not a company is earning a profit?  

a. Income statement

b. Statement of cash reconciliation

c. Balance statement

d. Statement of cash flows

e. Statement of owners' equity

Which of the following is not a feature of a good organizational structure?

a. Clear line of authority

b. Adequate delegation of authority

c. Proper span of control

d. More managerial levels

e. Simple and flexible structure

Operations can be classified according to their volume and variety of production, as well as the degree of variation and visibility. Which of the following operations would be classified as high-volume, low-variety?  

a. A cashier's

b. A carpenter's

c. A family doctor's

d. A front-office bank's

Why does a business analyze its financial accounts to assess its solvency?

a. To check whether it can meet its current financial obligations.

b. To monitor depreciation.

c. To confirm customers are making prompt payments.

d. To assess the efficiency of the manufacturing process.

Which one of the following is not the purpose of Performance Appraisal?

a. It can serve as a basis for job change or promotion.

b. It serves as a guide for formulating a suitable training and development program.

c. It provides the rational foundation for the payment of piece work, wages, bonuses, etc.

d. It makes the worker committed and loyal to the organization.

e. It serves as feedback to the employee.

Which of the following are not legitimate risk management options?



1.Terminate
2.Turn
3.Tolerate
4.Treat
5.Test
6.Transfer.

a. 1 and 4

b. 2 and 3

c. 5 and 6

d. 2 and 5

e. 1 and 6

f. 3 and 4

Which of the following would help a company manufacture products to the standard required by the customer?

a. Performance appraisal

b. Stock control

c. Quality control

d. Strategic planning approach

In decentralization, subordinates __________ .

a. enjoy significant powers

b. are permitted limited powers

c. Do not get any powers

d. work unsupervised

e. are no longer managed

Which of the following is not included in calculating working capital?

a. Stock of work in progress

b. Plant

c. Debtors

d. Creditors

Which term refers to an internal framework for ensuring that an organization behaves responsibly?

a. Performance monitoring

b. Governance

c. Strategy

d. Watchdog

e. Stakeholder

Which two factors are combined to evaluate the size of risks facing an organization?

a. Probability and Scale.

b. Impact and Importance

c. Probability and Impact

d. Scale and Importance.

Which term refers to an activity or a series of activities that transform inputs into outputs?

a. Process

b. Policy

c. Practice

d. Paradigm

Which of the following is incorrect?

a. Because errors creep in more easily when decisions are made on the basis of subjective judgment or past experience, using Operations Research Techniques improves the likelihood of a good decision.

b. Operations Research Techniques make it possible to break down a complex large-scale problem into smaller parts that can be more easily diagnosed and manipulated.

c. Operations Research Techniques permit experimentation to take place without interfering with actual operations.

d. Operations Research Techniques can be effectively applied in many situations where the underlying variables cannot be quantified, e.g. situations involving human qualities and interpersonal relations.

'Span of Control' relates to the ____________.

a. division of responsibility

b. delegation of authority

c. number of persons to be supervised

d. the physical area managed by a person

Delegation takes place when ______________.

a. a superior abrogates responsibility for a task.

b. one person gives another the right to do a piece of work.

c. a subordinate is given orders.

d. the manager closely monitors the subordinate's execution of a task.

Which of the following statements regarding the five core job dimensions is true?

a. The less feedback individuals receive, the more autonomy they feel and the more committed they will be to the job.

b. The less variety in the skills a person can use in performing work, the more the person perceives the task as meaningful or worthwhile.

c. The more the work has a direct effect on the work or lives of other people, the less the employee will view the job as meaningful.

d. The more autonomy in the work, the more responsibility the workers feel for their success and failures and the more committed they are to their work.

Which of the following is generally an inappropriate reason for delegation?

a. It relieves the manager of his/her heavy workload.

b. It frees the manager to address more complex, higher-level needs.

c. Someone else is better qualified to do the task that needs to be done.

d. It helps create a formal organizational structure.

Which one of the following is not the function of Personnel Management?

a. Procurement of the right kind and number of persons.

b. Training and development of employees.

c. Integration of the interests of the personnel with that of the enterprise.

d. Management of customer requirements

A member of the Board of Directors of a company who is not an employee of the company is called a _____________.

a. consultant

b. inside director

c. non-executive director

d. corporate officer

Which of the following statements is not likely to characterize a planning approach to strategy development?

a. Strategies are the outcome of rational, sequential, and methodical practices

b. Definite and precise objectives are set

c. Strategies are developed by negotiation and bargaining between interest groups

d. Defined procedures for the implementation and achievement of strategic objectives are developed

e. None of the above

Which of the following are incorrect?

1.Policies are established after a thorough study and analysis of work. Procedures are often established without any study and analysis.
2.Policies help us in fulfilling the objectives of the enterprise. Procedures show us the way to implement policies.
3.Policies are specific and lay down the sequence of definite acts. Procedures are generally broad and allow some discretion.
4.Policies are general guides to both thinking and action of people at higher levels. Procedures are general guides to action only, usually at lower levels.

a. 1 and 2

b. 1 and 3

c. 2 and 3

d. 2 and 4

e. 3 and 4

f. 1 and 4

Selling stock not actually owned in the expectation that the price will fall is known as _____________.

a.going long

b.flotation

c.short-selling

d.divestment

Which one the following is not a function of a 'transactional' leader?

a. Moving resources from areas of lesser productivity to areas of greater productivity.

b. Working within a culture and competently supervising and coordinating the day-to-day management.

c. Maintaining the system through control of current procedures.

d. Recognizing and clarifying roles and task requirements.

e. Maintaining an organization's operation rather than changing it.

According to the team roles identified by Belbin, a 'plant' is someone who is _________.

a. highly-specialized

b. good at turning ideas into action

c. creative and unorthodox

d. adept at handling inter-personal relationships

A tool to plot the duration of activities in a project and its dependencies is named after:

a. Robert George

b. Toby Williams

c. Henry Gantt

d. Samuel Edwards

Which of the following is not a key function of leadership?

a. Enthusing and inspiring staff.

b. Setting strategic direction.

c. Being accountable for performance.

d. Closely monitoring the execution of tasks.

If a company's productivity is rising, it means ___________ .

a. costs are rising at a faster rate than output.

b. output is rising at a faster rate than costs.

c. output and costs are increasing at the same rate.

d. output and costs are decreasing at the same rate.

Which of the following activities should not be outsourced?

a. Core business

b. Project management

c. Human Resources

d. Marketing

e. Sales

Which ratio shows an organization's effectiveness in minimizing production costs?

a. Gross profit ratio

b. Current ratio

c. Efficiency ratio

d. Selling ratio

Set-up costs that make it difficult for new companies to enter a particular market are known as ___________.

a. hurdles to entry

b. barriers to entry

c. obstacles to entry

d. impediments to entry

Which item appears in both the balance sheet and the profit and loss account?

a. Suppliers

b. Heating

c. Sales

d. Closing stock

oDesk test HTML 5 ANSWERS

Question: 01 
Which media event is triggered when there is an error in fetching media data in HTML 5.0?
a.     onstalled
b.     onwaiting
c.     onsuspend
d.     oninvalid
Question: 02
Which of the following video file formats are currently supported by the <video> element of HTML 5.0?
a.     CCTV
  b.     MPEG 4
c.     Ogg
d.     3GPP
Question: 03
Which of the following is NOT a valid value for the <iframe> sandbox attribute in HTML 5.0?
a.     url
b.     allow-scripts
c.     allow-same-origin
d.     allow-forms

Question: 04
Which of the following is an INVALID value for the type attribute of command tag?
a.     checkbox
b.     radio
  c.     command
d.     text
Question: 05
What is the function of the history traversal task source in HTML 5.0?
a.     It is used for features that react to user interaction, for example, keyboard or mouse input.
b.     It is used for features that react to DOM manipulations, for example, the things that happen asynchronously when an element is inserted in the document.
   c.     It is used to queue calls to history.back() and similar APIs.
d.     All of the above.
Question: 06
What will be the result if you use the following code to your HTML 5.0 document?
<p>I use <del>MAC</del> <ins>Microsoft</ins>!</p>
a.     I use MAC Microsoft!
b.     I use MAC Microsoft!
  c.     I use MAC Microsoft!
d.     I use MAC Microsoft!
Question: 07
You want to create a link for your website allowing users to email the webmaster. How will you implement this if the webmaster’s email address is webmaster@xcompany.com?
a.     <a href=”mailto:webmaster@xcompany.com”>webmaster</a>
b.     <a href=”webmaster@xcompany.com”>webmaster</a>
c.     <a http=”mail:webmaster@xcompany.com”>webmaster</a>
d.     <mail http=”send:webmaster@xcompany.com”>webmaster</mail>
Question: 08
In HTML 5.0, how will the script be executed if you use the script element shown below?
<script src=”script.js” type=”text/javascript” defer=”defer”></script>
a.     The script is fetched and executed immediately, before the user agent continues parsing the page.
  b.     The script will be executed when the page has finished parsing.
c.     The script will be executed asynchronously, as soon as it is available.
Question: 09
What is the output when you use the HTML 5.0 code snippet shown below?
<body onload=”alert(this)”>
a.     It will alert saying “[object HTMLBodyElement]” when the document is loaded.
b.     It will alert saying “[object Window]” when the document is loaded.
c.     It will alert saying “[this]” when the document is loaded.
d.     The alert message is not properly defined in the body element and an error will be generated when the document is loaded.
Question: 10
A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?
a.     <emp>
b.     <code>
c.     <dfn>
d.     <cite>
Question: 11
How will you bind the datalist option (shown below) with an <input> element, whose type attribute is set to url, to get the result shown in the image?
 This question is based upon the figure shown below:

odesk answer test
a.     User should define an accept attribute to the input element whose type is url.
b.     User should define multiple attribute to the input element whose type is url.
c.     User should define a list attribute to the input element whose type is url.
d.     User should define a placeholder attribute to the input element whose type is url.
Question: 12
Which of the following are valid HTML 5.0 elements?
    a.     <canvas>     b.     <summary>
c.     <aside>
d.     <video>

(Check ALL)
Question: 13
How does a button created by the <button> tag differ from the one created by an <input> tag?
   a.     An input tag button can be a reset button too.
b.     A button tag button can be a reset button too.
c.     An input tag button can include images as well.
d.     A button tag can include images as well.
Question: 14
Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
a.     col
    b.     colgroup
c.     rowspan
d.     row
Question: 15
Which of the following is correct with regard to the oncanplaythrough event fired by media resources in the HTML 5.0 document?
a.     The script will run when the media has reached the end.
  b.     The script will run when the media is played to the end, without stopping for buffering.
c.     The script will run when media data is loaded.
d.     The script will run when the length of the media is changed.
Question: 16
What does the icon attribute of the HTML 5.0 command tag define?
<command icon=”?”>Click Me!</command>
a.     It is used to define the url of an image to display as the command.
b.     It is used to define the name of the radiogroup this command belongs to.
c.     It is used to define if the command is checked or not.
d.     It is used to define if the command is available or not.
Question: 17
While rendering your HTML 5.0 web page, which of the following <link> element files will get skipped by a compliant user agent if you include the link elements shown below in your document?
<link rel=”stylesheet” href=”A” type=”text/plain”>
<link rel=”stylesheet” href=”B” type=”text/css”>
a.     A link element whose href is “B”
b.     A link element whose href is “A”
c.     None of the above
Question: 18
Which <body> tag event is fired when the user leaves the document?
a.     onunload
b.     onundo
c.     onredo
d.     onerror
Question: 19
How will you change the value of the cookies and items in the Storage objects of the localStorage attributes in HTML 5.0?
a.     By invoking the window.dialogArguments() API method.
  b.     By invoking the window. navigator.yieldForStorageUpdates() API method.
c.     By invoking the window.navigator.appName API method.
Question: 20
What is the role of the <dfn> element in HTML 5.0?
a.     It is used to define important text.
b.     It is used to define computer code text.
c.     It is used to define sample computer code.
d.     It is used to define a definition term
Question: 21
Which of the following is NOT a valid syntax for the <h1> element in HTML 5.0?
a.     <h1> This is header 1</h1>
   b.     <h1 align=”center”> This is header 1</h1>
c.     <h1 onClick=”dothis(‘sc1′)” >This is header </h1>
d.     <h1 style=”cursor:auto;”>This is header </h1>
Question: 22
Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?
a.     onload
b.     onsubmit
c.     onunload
d.     onreset
Question: 23
How will you return a reference to the parent of the current window or subframe in an HTML 5.0 web application?
a.     window.top
b.     window.parent
c.     window.frameElement
d.     None of the above
Question: 24
In HTML 5.0, which of the following is NOT a valid value for the type attribute when used with the <command> tag shown below?
<command type=”?”>Click Me!</command>
a.     button
b.     command
c.     checkbox
d.     radio
Question: 25
What is the default background color for the canvas element in HTML 5.0?
a.     Black
b.     White
  c.     Transparent
d.     Gray
Question: 26
Which of the following are valid mouse events in HTML 5.0?
    a.     ondblclick     b.     ondragstart
c.     ondragenter
d.     onscroll
e.     ondrop

(Check ALL)
Question: 27
Which of the following languages will you use to paint the graphics designed using the HTML 5.0 <canvas> tag?
a.     VB script
b.     JavaScript
c.     PostScript
d.     None of the above
Question: 28
Consider the following items of a <select> list:
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>


Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
a.     89
   b.     90
c.     Item 1
d.     Item 2
Question: 29
Which of the following would give a yellow background to the web page?
Note: The code used in the “correct” answer below was deprecated in HTML 4.01! Use styles instead for new code.
a.     <body backcolor=”Yellow”>
b.     <body background=”Yellow”>
c.     <body bgcolor=”Yellow”>
d.     <body color=”Yellow”>
Question: 30
What is the function of onobsolete, an application cache API method in HTML 5.0?
a.     It reflows the HTML document using updated cached content.
b.     It triggers an event when the cache content has been marked as obsolete.
c.     It triggers an event when the cache content has been updated.
d.     It updates the cache for the current document in the background.
Question: 31
Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?
a.     <input name =’be evil’ />
b.     <input name=be evil />
c.     <input name = “be-evil” />
d.     All of the above.
Question: 32
Consider the above code. What will be the impact upon the contents of the element if both the style sheets define the same class?
This question is based upon the figure shown below:
odesk answer test
a.     The contents of the element will be of red color and will inherit all the effects of style.css.
  b.     The contents of the element will be of blue color and will inherit all the effects of style1.css.
c.     The contents of the element will be of white color and will inherit all the effects of style.css and style1.css.
d.     None of the style effects will be applied to the contents of the element.
Question: 33
Which of the following is NOT a valid attribute for the <link> element in HTML 5.0?

a.     hreflang
b.     rel
c.     http-equiv
d.     media
Question: 34
Which of the following statements is correct if you allow the user to select only one radio button from a group of radio buttons?

a.     The name of the input tag must be the same for all the radio buttons.
b.     The value of the input tag must be the same for all the radio buttons.
c.     The display text of the input tag must be the same for all the radio buttons.
d.     All the radio buttons must be added to the same group using the <optgroup> tag.
Question: 35
Which of the following is an INVALID keyword value for http-equiv attribute when used with the <meta> element in HTML 5.0?

a.     content-type
b.     expires
c.     set-cookie
d.     keywords
e.     refresh
f.     author
Question: 36
Which of the following <iframe> attributes are NOT supported in HTML 5.0?

a.     height
b.     marginheight
c.     sandbox
d.     scrolling
Question: 37
In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below?

<iframe src=”aaa ” sandbox=?></iframe>
a.     It is used to define the restrictions to the frame content.
b.     It is used to define the URL of the document that should appear in the iframe.
c.     It is used to specify that an iframe should appear as if it is part of the document the iframe is in.
Question: 38
Which of the following is NOT a supported attribute of the <ol> element in HTML 5.0?

a.     type
b.     reversed
c.     start
d.     compact
Question: 39
When is the window onstorage event triggered in the HTML document?

a.     It is triggered when the window is resized.
b.     It is triggered when a document loads.
c.     It is triggered when a document performs an undo function.
d.     It is triggered when the window becomes visible.
Question: 40
Which of the following is NOT a valid attribute for the <video> element in HTML 5.0?

a.     controls
b.     autoplay
c.     disabled
d.     preload

oDesk PHP Test

Ques: The setrawcookie() method of setting cookies is different from PHP standard method of cookie setting as:
a. It does not allow expiry time to be set
b. It can be used only once
c. It does not URL-ENCODE the value on its own
d.It does not allow domain setting
Ans: C
Ques: You need to keep an eye on the existing number of objects of a given class without introducing a non-class varibale. which of the following makes this happen?
a. Add a member varibale that gets incremented in the default constructer and decremented the destructer.
b. Add a local variable that gets incremented in each constructer and decremented in the desructer
c. Add a static member variable that gets incremented in each constructer and decreented in the destructor
d. This cannot be accomplished since the creation of objects is being done dynamically via “new”
Ans: c
Ques: which of the following variable declaration within a class is invalid in PHP5?
a. private $type = “moderate”;
b. var $term = 3;
c. public $amn = “500″;
d. protected $name = ‘Quantes Private Limited’;
Ans: d
Ques: which of the following is not valid PHP parser tag?
a. script
b. ?p
c. %
d. ?php;
Ans: c
Ques: How can you hide the fact that web pages are written in PHP?
a. By using AddType application/X-httpd-php asp
b. Specify all file names without any dot and extension
c. By using .htaccess diretive in Apeche
d. All of the above
Ans: C
Ques: What is the output of the following code?
$a = 3;
$b = 2;
echo (int)$a/(int)$b
?>
a. 1
b. 1.5
c. 2
d. 3
e. Eroor
Ans: b

Ques: Which one is correct?
a. $s = fwrite (“a string here”);
b. $s = fwrite ($fp,”a string here”);
c. $s = fwrite (“a string here”,$fp);
d. non of the above
Ans: b
Ques: Which of the following set of operations is not valid in PHP 5?
a. >, >=
b. =,==
c. !==,!==
d. +=, *=
Ans: C
Ques: Late PHP version support remote file accessing for the functions:
a. include()
b. include_once()
c. require_once()
d. All of the above
Ans: D

Ques: What will be the output of the following script?
$count=50;
function Argument()
{
$count++;
echo $count;
}
Argument()
?>
a. It will print 50
b. It will print 51
c. It will print 52
d. It will print 1
Ans: D
Ques: which of the following are used for code reuse?
a. Loops
b. functions
c. Database
d. include files
Ans: B,D
Ques: which of the following is the corect way of specifying default value?
a. Function GetDiscount($Type = “Special”) {………}
b. Function GetDiscount(Type := “Special”) {………}
c. Function GetDiscount($Type: = “Special”) {………}
d. Function GetDiscount($Type : “Special”) {………}
Ans: b
Ques: Which of the following are “magic constant”?
a. __LINE__
b. __FILE__
c __PRETTY_FUNCTION__
d __CLASS__
e. __METHOD__
Ans: c
Ques: you have defined three variables $to, $subject, and $body to send an email. Which of the following methods would you use for sending an email?
a. mail($to, $subject,$body)
b. sendmail($to, $subject,$body)
c. mail(to, subject,body)
d. sendmail(to, subject,body)
Ans: a
Ques: Which one of the following is turnary operator?
a. &
b. =
c. :?
d. ?:
e. +=
f. &&
Ans: D
Ques: What is the result of the following Exprssion?
5+2*4+6
a. 70
b. 19
c. 34
d. 21
Ans: B
Ques: The default value of register global in PHP is:
a. Off
b. On
Ans: A
Ques: What would b the outpur of the following code?
$string = ‘good day’;
$string = ucword($string);
echo $string;
?>
a. good day
b. GOOD DAY
c. Good Day
d. non of the above
Ans: C
Ques: If you want to pass a value to a function by reference, the correct way is:
a. function ModifyReport(&$Rptfile){}
b. function ModifyReport($Rptfile){}
c. function ModifyReport(ByRef $Rptfile){}
d. function ModifyReport(&Rptfile){}
Ans: D

oDesk Knowledge of jQuery 1.3.2 Skills Test


Which of the following functions is/are jQuery regular expression built-in function(s)?

a. test
b. match
c. find
d. jQuery does not have regular expression built-in functions.

The height function returns the height of an element in ________.

a. pixel unit
b. point unit
c. em unit
d. millimeter unit

offset function gets the current offset of the first matched element in pixels relative to the ________.

a. document
b. parent element
c. children element
d. container

Consider the following code snippet:
$.map(array1, function1);

Which of the following arguments is/are valid arguments of function1?

a. The index of the element to be translated in array1.
b. The item to be translated.
c. function1 has no arguments.
d. a and b
e. a and c

Which of the following statements returns all https anchor links?

a. $('a[href^=https]');
b. $('a[href$=https]');
c. $('a[href=https]');
d. $('a[href]=https');

$('#id1').animate({width:"80%"}, "slow")

The above code snippet will ________.

a. animate the tag with id1 from the current width to 80% width.
b. animate the tag with id1 from 80% width to current width.
c. animate the tag with id1 from the current 80% width to 0px.
d. animate the tag with id1 from 80% width to 100% width.

How or Where can we declare a plugin so that the plugin methods are available for our script?

a. In the head of the document, include the plugin after main jQuery source file, before our script file.
b. In the head of the document, include the plugin after all other script tags.
c. In the head of the document, include the plugin before all other script tags.
d. Anywhere in the document.

Consider the following code snippet:
$(document).ready(function() {
  $('div').each(function(index) {
    alert(this);
  });
});

Which of the following objects does the 'this' variable refer to?

a. window
b. document
c. The current div tag of the iteration
d. The last element tag in body

Which of the following returns the children tags of "id1"?

a. $('#id1').children();
b. $('#id1').getChildren();
c. children('#id1');
d. getChildren('#id1');

Which of the following arguments is/are (a) valid argument(s) of fadeIn function?

a. 'slow'
b. 1000ms
c. 3000
d. a and b
e. a and c

Consider the following code snippet:
$(document).ready(function1);
$(document).ready(function2);
$(document).ready(function3);

Which of the following functions are executed when DOM is ready?

a. function1
b. function2
c. function3
d. a, b and c
e. No function is executed.

Which of the following methods can be used to utilize animate function with backgroundColor style property?

a. Use jQuery UI library.
b. There is no need to do anything as jquery core already supports that style property.
c. There's no way to use animate with that style property.

Read the following JavaScript code snippet:
$('div#id1').bind('click.divClick', function () {alert('A div was clicked');});

What is divClick in the code snippet?

a. An event type.
b. An event function.
c. A div class.
d. A namespace.

Which of the following values is/are valid value(s) of secondArgument in addClass('turnRed', secondArgument); function, if we use jQuery UI library?

a. 'fast'
b. slow
c. 1000ms
d. 3000

$("div").find("p").andSelf().addClass("border");

The statement adds class border to ________.

a. all div tags and p tags in div tags
b. all div tags
c. all p tags
d. all p tags that in div tag

Which of the following functions can be used to attach event handler to an element?

a. bind
b. attach
c. add
d. handle

What does $('tr.rowClass:eq(1)'); return?

a. One element set which is the second row of the first table.
b. One element set which is the first row of the first table.
c. A set of tr tags which have "rowClass:eq(1)" class .
d. A set of tr tags which have "eq(1)" class .

The hide() function hides an element by ________.

a. setting "display" inline style attribute of that element to "none".
b. setting "visibility" inline style attribute of that element to "hidden".
c. setting the horizontal attribute of that element to "-100".
d. setting the vertical attribute of that element to "-100".

is() function ________ the current selection against an expression.

a. checks
b. finds
c. filters
d. gets

Assume that you want that first the tag with "id1" fades out and then the tag with "id2" fades in. Which of the following code snippets allow(s) you to do so?

a. $('#id1').fadeOut('fast'); $('#id2').fadeIn('slow');
b. $('#id2').fadeIn('slow'); $('#id1').fadeOut('fast');
c. $('#id1').fadeOut('fast', function() {$('#id2').fadeIn('slow')});
d. $('#id2').fadeIn('slow', function() {$('#id1').fadeOut('fast')});

If you include jQuery after other library, how do you disable the use of $ as a shortcut for jQuery?

a. By calling jQuery.noConflict(); right after including jQuery.
b. By calling jQuery.useDefault = false; right after including jQuery.
c. By calling jQuery.useShortcut = false; right after including jQuery.
d. By calling jQuery.conflict = false; right after including jQuery.

Consider the following code snippet:
var message = 'Message';
$('#id1').bind('click', {msg: message}, function(event) {
alert(event.data.msg);
});
message = 'New message';
$('#id2').bind('click', {msg: message}, function(event) {
alert(event.data.msg);
});

What does the alert box display if you click on "id1"?

a. Message
b. New message
c. Nothing
d. None of the above

Consider the following code snippet:
$('#button1').bind('click', function(data) {...});

What is the data argument?

a. Click event's data
b. Function's data
c. Global variable
d. Local variable

Which of the following statements select(s) all option elements that are selected?

a. $(':selected');
b. $('select[selected]');
c. $('option:selected');
d. a and c
e. b and c

Inner Height function returns the inner height of an element, ________ the border and ________ the padding.

a. excludes, includes   
b. excludes, excludes
c. includes, excludes
d. includes, includes

Which of the following statements return(s) a set of p tags that contain "jQuery"?

a. $('p:contains(jQuery)');
b. $('p:contains("jQuery")');
c. $('p:has("jQuery")');
d. a and b
e. a and c

jQuery allows you to use ________ function to switch between showing and hiding an element.

a. show
b. hide
c. switch
d. toggle

Consider the following code snippet:
<div id='id1'><div id='id2'>Div 2</div></div>

Which of the following tags is/are in the result of $('#id2').parents();?

a. <html>
b. <head>
c. <body>
d. a and c
e. b and c

Which of the following functions can be used to bind an event handler to display a message when the window is closed, reloaded or navigated to another page?

a. end
b. exit
c. unload
d. None of the above.

each is a generic ________ function.

a. comparator
b. operator
c. iterator
d. normal

$('ul#myId > li');

What does the above statement return?

a. A set of tags whose id is "li".
b. A set of tags which contains class "li".
c. A set of li tags which are children of ul tags that have "myId" class.
d. A set of li tags which are children of ul tags that have "myId" id.

Which of the following commands creates a basic dialog containing this code snippet «font size=2»«div id="id1"»Simple dialog«/div»«/font» using jQuery UI?

a. $('#id1).dialog();
b. $('#id1).showDialog();
c. $('#id1).widget();
d. $('#id1).showWidget();

What is the result of this function jQuery.makeArray ( true )?

a. 1
b. NaN
c. [ true ]
d. []

What is the difference between $('p').insertBefore(arg1) and $('p').before(arg2) statement?

a. The former inserts p tags before the tags specified by arg1, the latter inserts content specified by arg2 before all p tags.
b. The former inserts content specified by arg1 before p tags, the latter inserts p tags before tags specified by arg2.
c. The former inserts arg1 inside p tags, the latter inserts p tags inside tags specified by arg2.
d. The former inserts p tags inside tags specified by arg1, the latter inserts arg2 inside p tags.

$.grep(array1, function1);

The above statement ________ the elements of array1 array which satisfy function1 function.

a. sorts
b. updates
c. removes
d. finds

Consider the following code snippet:
var message = 'Message';
$('#id1').bind('click', function() {
    alert(message);
});
message = 'New message';
$('#id2').bind('click', function() {
    alert(message);
});

What does the alert box display if you click on "id1"?

a. Message
b. New message
c. Nothing
d. None of the above

Which of the following statements uses a valid selector?

a. $('P');
b. $('#myId');
c. $('.myClass');
d. a, b and c
e. b and c

Consider the following code snippet:
<font size=2>
<ul id='id1'>
  <li id='li1'>Items 1</li>
  <li id='li2'>Items 2</li>
  <li id='li3'>Items 3</li>
</ul>
</font>

Which of the following code snippets return(s) a set of all li tags within "id1" except for li tag with id "li2"?

a. $('#id1 li').not($('#li2'));
b. $('#id1 li').except($('#li2'));
c. $('#id1 li').remove($('#li2'));
d. $('#id1 li').delete($('#li2'));

Which of the following functions will return an empty set when end() function is chained right after that function?

a. add
b. children
c. filter
d. remove

Assuming that you use jQuery UI library to make a list sortable, which of the following code snippets makes "list1" sortable?

a. $('#list1').sortable();
b. $('#list1').changeable();
c. $('#list1').interchangeable();
d. $('#list1').organizeable();

The outer height is returned by outerHeight function including ________ and ________ by default.

a. border, padding
b. border, margin
c. margin, padding
d. None of the above.

$('#a1').one('click', {times: 3}, function1);

Which of the following is true for the above?

a. function1 will be executed once regardless of the number of times a1 is clicked.
b. function1 will be executed at most 3 times if a1 is clicked more than twice.
c. There is at most one instance of function1 to be executed at a time.
d. There are at most three instances of function1 to be executed at a time.

Consider the following code snippet:
$('span.item').each(function (index) {
    $(this).wrap('«li»Item«/li»');
});

What does this code snippet do?

a. Wraps each span tag that has class item within a li tag.
b. Inserts each span tag that has class item into a li tag.
c. Inserts «font size=2»«li»Item«/li»«/font» into each span that has item class.
d. Replaces each span tag that has class item with a «font size=2»«li»Item«/li»«/font».

Which of the following values is/are valid argument(s) of eq() function?

a. 1
b. '2'
c. both a and b
d. neither a nor b

Which of the following methods can be used to delete a specified tag?

a. remove.
b. delete.
c. truncate.
d. empty.

Which of the following statements returns the number of matched elements of $('.class1')?

a. $('.class1').size();
b. count($('.class1'));
c. $('.class1').count;
d. None of the above

Which of the following gets the href attribute of "id1"?

a. $('#id1).attr('href');
b. $('#id1').getAttribute('href');
c. $('#id1)[0].attr('href');
d. All of the above.

If you include jQuery before another library, how do you avoid conflict between jQuery and that library?

a. By calling jQuery.noConflict(); right after including jQuery.
b. By calling jQuery.useDefault = false; right after including jQuery.
c. By calling jQuery.useShortcut = false; right after including jQuery.
d. By using jQuery object when you work with jQuery library and using $ object for other libraries.

Consider the following code snippet:
$('#ul1 li').live('click', function1);
$('#ul1').after('<li id="lastLi">Last item</li>');

Is function1 executed if "lastLi" is clicked?

a. Yes
b. No
c. "lastLi" does not exist.

Which of the following methods can be used to load data?

a. getJSON.
b. get.
c. ajaxSend.
d. ajaxStart.

Which of the following functions moves p tags that have para class to div with content id?

a. function moveElement() {
        $('p.para').each(function(index) {
            $(this).appendTo('#content');
        });
    }
b. function moveElement() {
        $('p.para').each(function(index) {
            $(this).append('#content');
        });
    }
c. function moveElement() {
        $('p.para').each(function(index) {
            $(this).insertAfter('#content');
        });
    }
d. function moveElement() {
        $('p.para').each(function(index) {
            $(this).after('#content');
        });
    }

Which of the following events can be used to disable right click contextual menu?

a. contextmenu
b. contextualmenu
c. rightclickmenu
d. Right click contextual menu cannot be disabled

Which of the following functions can be used to stop event propagation?

a. stopPropagation
b. disablePropagation
c. cancelPropagation
d. preventPropagation

Assume that you need to build a function that manipulates an image when the image is loaded. Which of the following functions should you use?

a. ready
b. load
c. change
d. focus

Consider the following code snippet:
$('#id1').animate({width:"240px"}, { queue:false, duration:1000 }).animate({height:"320px"}, "fast");

The order of the animations of this code snippet is ________.

a. first width animation, then height animation
b. first height animation, then width animation
c. both width animation and height animation occur at the same time.
d. random

jQuery allows simulating an event to execute an event handler as if that event has just occurred by using ________.

a. trigger function
b. execute function
c. intimate function
d. jQuery does not have this feature.

What is the result of NaN == NaN?

a. true
b. false
c. An error occurs.
d. None of the above.

The css() function allows you to ________.

a. change the css class attribute.
b. change the css file path.
c. apply the css class to an element.
d. change the inline style attribute of an element.

What is the result of the following code snippet?
jQuery.unique([1, 2, 2, 3, 3, 1]);

a. [1, 2, 3].
b. [1, 2, 3, 1].
c. [1, 3, 2, 1, 2, 3].
d. [1, 1, 2, 2, 3, 3].
e. None of the above

Consider the following code snippet:
<ul id='id1'>
  <li id='li1'>Items 1</li>
  <li id='li2'>Items 2</li>
  <li id='li3'>Items 3</li>
</ul>

Which of the following code snippets returns the same result as $('#id1 li').not($('#li2'));?

a. $('#li2').siblings();
b. $('#id2').siblings('#li2');
c. $('#li2').children();
d. $('#id2').children('#li2');

Is the following code snippet a valid ajax request?
$.ajax({data: {'name': 'jQuery'},});

a. Yes.
b. No, because it does not have url.
c. No, because it does not have any argument after the comma.
d. No, because the function ajax does not exist in jQuery.

Consider the following code snippet:
<form id="form1">
    <input type="text" id="text1" value="default" />
    <input type="text" name="email" />
</form>
<script type="text/javascript">
    function submitForm1()
    {
      alert($('#form1').serialize());
    }
</script>

What does the alert box display when the function submitForm1 is called?

a. email=
b. email=&text1=default
c. text1=&text2=
d. Nothing in the alert box.

Which of the following statements return(s) a set of even rows?

a. $('tr').filter(':even');
b. $('tr:nth-child(even)');
c. $('tr:odd');
d. a and b
e. b and c

One advantage of $.ajax function over $.get or $.post is that ________.

a. $.ajax offers error callback option.
b. $.ajax is easier to use.
c. $.ajax allows passing request parameters.
d. the result of $.ajax is formatted.

Consider the following code snippet:
$('#table1').find('tr').hide().slice(10, 20).show();

What is the result of this code snippet?

a. Showing table1's rows from 11th to 20th.
b. Showing table1's 20 rows from 10th.
c. Deleting rows of table1 from 10th to 20th.
d. Deleting 20 rows of table1 from 10th onward.

Consider the following code snippet:
$('#div1').html($('#div1').html().replace(/bad/, " "));

Which of the following is the result of this code snippet?

a. Replacing "bad" word in the inner html of div1.
b. Removing any word containing "bad" in the inner html of div1.
c. Appending an inner html of div1 which removes "bad" word to div1's inner html.
d. Appending an inner html of div1 which removes any word containing "bad" to div1's inner html.

Which of the following methods can be used to copy element?

a. clone.
b. cloneTo.
c. move.
d. moveTo.

Consider the following code snippet:
$('#table1 tr:odd').addClass('oddRow');
$('#table1 tr:even').addClass('evenRow');


The result of the above code snippet is ________.

a. the odd rows of table1 have evenRow class, while the even rows have oddRow class
b. the odd rows of table1 have oddRow class, while the even rows have evenRow class
c. all rows of table1 have evenRow class
d. None of the above.

Consider the following code snippet:
$('#id1').animate({width:"240px"}, "slow").animate({height:"320px"}, "fast");

The order of the animations of this code snippet is:

a. first width animation, then height animation
b. first height animation, then width animation
c. both width animation and height animation occur at the same time.
d. random

Consider the following code snippet:
ajaxStart(function1);

The function1 will be executed when ________.

a. any ajax request starts.
b. ajaxStart function is executed.
c. any ajax request starts and there is no active ajax request.
d. jQuery does not have ajaxStart function.

position function gets the ________ positions of an element that are relative to its offset parent.

a. top and left
b. top and right
c. bottom and left
d. bottom and right

Which of the following code snippets insert(s) the code snippet <div class="footer">footer</div> at the end of div tags?

a. $('div').append('<div class="footer">footer</div>');
b. $('div').appendTo('<div class="footer">footer</div>');
c. $('<div class="footer">footer</div>').append('div');
d. $('<div class="footer">footer</div>').appendTo('div');

Consider the following code snippet: $('#table1').find('tr').filter(function(index) { return index % 3 == 0}).addClass('firstRowClass');

The result of the above code snippet is ________.

a. the rows of table1 at order 3n + 1 (n = 0, 1, 2,...) have class firstRowClass
b. the rows of table1 at order 3n (n = 1, 2,...) have class firstRowClass
c. all rows of table1 have class firstRowClass
d. no row of table1 has class firstRowClass

$.merge(array1, array2);

The above function merges ________.

a. array1 into array2.
b. array2 into array1.
c. array1 with array2 and returns the result.
d. The statement is invalid. The correct one is array1.merge(array2);

Consider the following code snippet:
<div id='id1'><div id='id2'>Div 2</div></div>

Which of the following tags is/are in the result of $('#id2').parents();?

a. <html>
b. <head>
c. <body>
d. a and c
e. b and c

$.extend(false, object0, object1, object2);

What does the above do?

a. Extends the object0 by merging object1 and object2 with object0.
b. Extends the object1 by merging object0 and object2 with object1.
c. Extends the object2 by merging object0 and object1 with object2.
d. The statement is invalid because its arguments are invalid.

Consider the following code snippet:
  function function1() {
    alert(arguments.length);
  }

Which of the following is true when you run function1();?

a. An error occurs because arguments variable is undefined.
b. An error occurs because you call function1 with no arguments.
c. The alert box displays "undefined".
d. The alert box displays 0.

What does $('tr:nth-child(4)') return?

a. A set of the fourth rows of the tables.
b. A set of the fifth rows of the tables.
c. A set of the fifth tr tags of the tables which have "nth-child(4)" class.
d. A set of the fifth tr tags of the tables which have "nth-child(4)" id.

Is it true that we have to place the result of jQuery.getScript between <script type="text/javascript"></script> tags in order to use the loaded script?

a. Yes.
b. No.

Consider the following code snippet:
$('span.item').each(function (index) {
    $(this).wrap('<li>Item</li>');
});

What does this code snippet do?

a. Wraps each span tag that has class item within a li tag.
b. Inserts each span tag that has class item into a li tag.
c. Inserts «font size=2»«li»Item«/li»«/font» into each span that has item class.
d. Replaces each span tag that has class item with a «font size=2»«li»Item«/li»«/font».

$("div").find("p").andSelf().addClass("border");

The statement adds class border to ________.

a. all div tags and p tags in div tags
b. all div tags
c. all p tags
d. all p tags enclosed in div tag

Which of the following commands creates a basic dialog containing this code snippet <div id="id1"> Simple dialog</div> using jQuery UI?

a. $("#id1").dialog();
b. $('#id1).showDialog();
c. $('#id1).widget();
d. $('#id1).showWidget();

Consider the following code snippet:
<ul id='id1'>
    <li id='li1'>Items 1</li>
    <li id='li2'>Items 2</li>
    <li id='li3'>Items 3</li>
</ul>

Which of the following code snippets return(s) a set of all li tags within "id1" except for li tag with id "li2"?

a. $('#id1 li').not($('#li2'));
b. $('#id1 li').except($('#li2'));
c. $('#id1 li').remove($('#li2'));
d. $('#id1 li').delete($('#li2'));

Consider the following code snippet:
$('span.item').each(function (index) {
    $(this).wrap('<li>Item</li>');
});

What does this code snippet do?

a. Wraps each span tag that has class item within a li tag.
b. Inserts each span tag that has class item into a li tag.
c. Inserts <li>Item</li> into each span that has item class.
d. Replaces each span tag that has class item with a <li>Item</li>.

Which of the following seems to be correct for ajaxStart(function()) method as shown in the below Code snippet?

$("#div1").ajaxStart(function())

a. Method Attaches a function to be executed before an Ajax request is sent.
b. Method Attaches a function to be executed whenever an Ajax request completes successfully.
c. Method Attaches a function to be executed whenever an AJAX request begins and there is none already activated.
d. None of the above.

Consider the following code snippet:
$('span.item').each(function (index) {
    $(this).wrap('<li>Item</li>');
});

What does this code snippet do?

a. Wraps each span tag that has class item within a li tag.
b. Inserts each span tag that has class item into a li tag.
c. Inserts Item into each span that has item class.
d. Replaces each span tag that has class item with a Item

Which of the following code snippets insert(s) the code snippet <div class="footer">footer</div> at the end of div tags?

a. $('div').append('
    footer
    ');
b. $('div').appendTo('
    footer
    ');
c. $('
    footer
    ').append('div');
d. $('
    footer
    ').appendTo('div');

Consider the following code snippet:
<form id="form1">
    <input type="text" id="text1" value="default" />
    <input type="text" name="email" />
</form>
<script type="text/javascript">
    function submitForm1()
    {
      alert($('#form1').serialize());
    }
</script>

What does the alert box display when the function submitForm1 is called?

a. email=
b. email=&text1=default
c. text1=&text2=
d. Nothing in the alert box.

Which of the following functions moves p tags that have para class to div with content id?

a. function moveElement() {
        $('p.para').each(function(index) {
            $(this).appendTo('#content');
        });
    }
b. function moveElement() {
        $('p.para').each(function(index) {
            $(this).append('#content');
        });
    }
c. function moveElement() {
        $('p.para').each(function(index) {
            $(this).insertAfter('#content');
        });
    }
d. function moveElement() {
        $('p.para').each(function(index) {
            $(this).after('#content');
        });
    }

Consider the following code snippet:
function function1()
{
   alert(arguments.length);
}

Which of the following is true when you run function1();?

a. An error occurs because arguments variable is undefined.
b. An error occurs because you call function1 with no arguments.
c. The alert box displays "undefined".
d. The alert box displays 0.

How can an Ajax Request that has not yet received the response, be canceled or aborted?

a. //xhr is ajax variable
    xhr.abort()
b. //xhr is ajax variable
    xhr.cancel()
c. //xhr is ajax variable
    xhr.die()
d. //xhr is ajax variable
    xhr.destroy()

Which of the following is the correct way to get a Value of selected dropdownlist in jQuery without using the selected value?

a. $("#yourdropdownid option:selected").text();
b. $("[id*='MyDropDownId'] :selected");
c. $("option:selected", myVar).text()
d. $('select[name="thegivenname"] option:selected').val();

Which of the following is the correct way to get the current URL in jQuery?

a. var pathname = window.location.pathname;
b. $(location).attr('href');
c. $(location).value('href');
d. var pathname = window.location.routename;

Which of the following is the correct way to do the following javascript Code with jQuery? var d = document; var odv = d.createElement("div"); odv.style.display = "none"; this.OuterDiv = odv; var t = d.createElement("table"); t.cellSpacing = 0; t.className = "text"; odv.appendChild(t);

a. this.$OuterDiv = $('
    ')
    .hide()
    .append($('
    ‘)

    .attr({ cellSpacing : 0 })
    .addClass("text")
    );
b. var t = $("

    ");
    $.append(t);
c. $('
    ',{
    text: 'Div text',
    'class': 'className'
    }).appendTo('#parentDiv');
d. var userInput = window.prompt("please enter selector");
    $(userInput).hide();

Which of the following is the correct way to select all the elements with JQuery from html that have the two classes a and b?

a. $('.a.b')
b. $('.a, .b')
c. $(".a").filter(".b")
d. a.b
    {
    style properties
    }

When the user clicks the image, a little popup is given to add some notes to the data. How can the input-image's event handler be disable if a zero is entered into the text box?

a. $('#myimage').off('click.mynamespace');
b. $('#myimage').click(function() { return false; });
c. $('#myimage').unbind('click');
d. $('#myimage').onclick(function() { return false; });

Which of the following is the correct way to Hide menu div by clicking outside the menu div?

a. $('html').click(function() {
    //Hide the menus if visible
    });

    $('#menucontainer').click(function(event){
    event.stopPropagation();
    });
b. $('#menucontainer').click(function(event) {
    $('body').one('click',function() {
    // Hide the menus
    });

    event.stopPropagation();
    });
c. $(document).click(function(event) {
    if($(event.target).parents().index($('#menucontainer')) == -1) {
    if($('#menucontainer').is(":visible")) {
    $('#menucontainer').hide()
    }
    }
    })
d. 4 down vote
    $(document).click(function() {
    $(".overlay-window").hide();
    });
    $(".overlay-window").click(function() {
    return false;
    });