JavaScript & AJAX interview questions
1. JavaScript is interpreted by _________
A. Client
B. Server
C. Object
D. None of the above
2. Using _______ statement is how you test for a specific condition.
A. Select
B. If
C. Switch
D. For
3. Which of the following is the structure of an if statement?
A. if (conditional expression is true) thenexecute this codeend if
B. if (conditional expression is true)execute this codeend if
C. if (conditional expression is true) {then execute this code>->}
D. if (conditional expression is true) then {execute this code}
4. How to create a Date object in JavaScript?
A. dateObjectName = new Date([parameters])
B. dateObjectName.new Date([parameters])
C. dateObjectName := new Date([parameters])
D. dateObjectName Date([parameters])
5. The _______ method of an Array object adds and/or removes elements from an array.
A. Reverse
B. Shift
C. Slice
D. Splice
6. To set up the window to capture all Click events, we use which of the following statement?
A. window.captureEvents(Event.CLICK);
B. window.handleEvents (Event.CLICK);
C. window.routeEvents(Event.CLICK );
D. window.raiseEvents(Event.CLICK );
7. Which tag(s) can handle mouse events in Netscape?
A. <IMG>
B. <A>
C. <BR>
D. None of the above
8. ____________ is the tainted property of a window object.
A. Pathname
B. Protocol
C. Defaultstatus
D. Host
9. To enable data tainting, the end user sets the _________ environment variable.
A. ENABLE_TAINT
B. MS_ENABLE_TAINT
C. NS_ENABLE_TAINT
D. ENABLE_TAINT_NS
10. In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.
A. a wrapper
B. a link
C. a cursor
D. a form
The Best Questions to Ask in the Interview
Some good topics to cover include: The company Dave Stanford, executive vice president of client services for contingency and contract staffing firm Winter, Wyman Companies suggests asking:
Why Do They Ask That in an Interview?
The company wants a team player and an independent worker
When you are asked whether you work better alone or in a team, what they really want to know is how you interact with others and how much direction you need when you're assigned to work by yourself.
If you use time alone well, are you able to keep your boss posted on your progress at reasonable intervals? Are you good at brainstorming in a group, the one who comes up with rapid-fire ideas? Or are you the person who is likely to mold them into a collaborative effort to find a solution for the challenge at hand? Either alone or in a team, you want to convey that you can interact well with co-workers at various levels of authority, but that you're a person who can be productive and come up with answers on your own as well.
Remember, an interview is a two-way street, and that's true where questions are concerned. Be sure to ask questions that show you have researched the company and that you're aware of current issues faced by the company and the industry it's in. You need to show an interest in the company if you want it to show an interest in you.
For years, people have been counseled to envelope their "weakness" in an answer that actually makes it sound like a strength. But job interviewers have heard them all, and those answers tend to sound hollow these days. Rather, choose a time when you had to face a significant challenge or adversity -- without getting too personal -- and tell how you overcame that dilemma and were improved by it. Tell what you learned and how that newfound knowledge benefited you as a professional. People who recognize their weaknesses and show they want to do better are showing a prospective employer they are willing to do their best, even if it means learning from mistakes.
Things to Tell an Interviewer
The best way to show these traits is to take the initiative and have several personal stories that you can tell, taking maybe 30 to 90 seconds each. You may want to start by developing your stories around these seven areas:
1. Times where you either made money or saved money for your current or previous company.
2. A crisis in your life or job and how you responded or recovered from it.
3. A time where you functioned as part of a team and what your contribution was.
4. A time in your career or job where you had to overcome stress.
5. A time in your job where you provided successful leadership or a sense of direction.
6. A failure that occurred in your job and how you overcame it.
7. Any seminal events that happened during your career to cause you to change direction and how that worked out for you. I want to emphasize that an interview should not be an interrogation. It should be a conversation between two equals. When you accomplish this you come away a step closer to your goal of landing the job you really want, because... It's the conversation that wins an interview, and it's the conversation that wins the job. To have a conversation, have your stories ready.
Things That Seal the Deal
Here's what hiring managers had to say:
"One of the big things for me is [following] up. If I'm on the fence about a candidate but they take the time to e-mail me and thank me for having them come in, it shows me that they are motivated, tactful and professional. On the other side of the coin, if I interview someone and they are using lots of banal business speak and don't give me any impression of what their personality is like, I will usually pass. I hate when I ask a candidate what their favorite thing to work on is and they say 'everything' -- it leaves me with the impression that they either have no personality or won't speak their mind." -- Keith Baumwald, interactive marketing analyst, Shoplet.com
"I know I have a good candidate for hire when they come in prepared with as many questions about the job and company as I have for the candidate -- especially when their questions go beyond just the pay rate and benefits. By showing interest in learning more about what the job opportunity actually involves, it shows that the candidate is just as concerned about this job being the right fit for them as I am." -- Angie Nelson, marketing coordinator, Les Bois Federal Credit Union
"A quick deal-killer for me is people who are trying to answer questions the way they think I want them answered. Honesty in the interview is refreshing. I appreciate applicants who tell the truth without trying to sugarcoat things. I am not as concerned with bad things that have happened in their past as much as how they dealt with those issues. That shows their true character." -- Phil Wrzesinski, owner, Toy House and Baby Too
"Confidence is important, but there is a fine line between that and arrogance. I once had a candidate state numerous times he was the one and that no way anyone else could be better. This is not only arrogant, but demonstrates ignorance on the part of the candidate. One does not always know who they are competing with or all of their qualifications." -- Thomasina Tafur, president, Thomasina Tafur Consulting
"When interviewing candidates to join our firm, two things can be deal breakers: attitude and core values. You can't teach attitude, but you can teach skill. A positive attitude, strong work ethic and strong values should trump more experience and skill. I also make sure the candidate demonstrates our company's core values. I ask them to tell me their 'story' of their professional journey. Through their story, I get a better understanding of the decisions they made and the values they have (or don't have)." -- Michelle Roccia, senior vice president of corporate organizational development, Winter, Wyman
"When a candidate is displaying a true desire to come work for your company, they are often the one you want to hire once you are looking at the finalist pool. The fastest way to end up with a short interview and ruling yourself out from being considered is to arrive to an interview to only lack energy, give short answers and show no excitement to be there." -- James Thompson, vice president of business development, JMJ Phillip
"When I hire, I hire for 'right fit,' which doesn't necessarily have anything to do with experience or training. A 'right fit' candidate is someone who is aligned philosophically with the company, has a passion for the products or industry, and believes that the kind of work that they do is their mission, not just their livelihood. For example, when I was staffing a green business in Orange County, Calif., I didn't hire the people with the longest résumés and the most degrees, I hired the people who were passionate about the 'green' cause and had demonstrated that in some way in their personal life. What we ended up with were employees who were willing to do whatever it took to make the enterprise successful because they were driven by an inner belief, not by a paycheck. They were engaged at an extremely high level from the first day they walked in the door. I hire for passion, and then train for skills, if necessary." --Barbara Farfan, management and retail consultant, Authentic Communications