Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   JavaScript knowledge test (http://www.velocityreviews.com/forums/t932265-javascript-knowledge-test.html)

marss 07-31-2007 12:24 PM

JavaScript knowledge test
 
Maybe anyone know good free online JavaScript knowledge test? This not
exactly a system for testing online required - it may be simply list
of questions with variants of answers (I have to prepare tests for
learners and I need something to be taken as basis).

I was able to find only this (http://www.w3schools.com/js/
js_quiz.asp), but I need more.

Thanks,
Mykola


rf 07-31-2007 12:57 PM

Re: JavaScript knowledge test
 

"marss" <marss.ua@gmail.com> wrote in message
news:1185884688.765527.285760@l70g2000hse.googlegr oups.com...

> Maybe anyone know good free online JavaScript knowledge test? This not
> exactly a system for testing online required - it may be simply list
> of questions with variants of answers (I have to prepare tests for
> learners and I need something to be taken as basis).


Why?

> I was able to find only this (http://www.w3schools.com/js/


Do not even consider stuff from this source.

Their question 18: The best way to open a new window. Har har :-)

> js_quiz.asp), but I need more.
>
> Thanks,
> Mykola
>




Henry 07-31-2007 01:02 PM

Re: JavaScript knowledge test
 
On Jul 31, 1:24 pm, marss <marss...@gmail.com> wrote:
> Maybe anyone know good free online JavaScript knowledge test?
> This not exactly a system for testing online required - it
> may be simply list of questions with variants of answers
> (I have to prepare tests for learners and I need something
> to be taken as basis).
>
> I was able to find only this (http://www.w3schools.com/js/
> js_quiz.asp), but I need more.


If your need is real you need something else entirely that that
'test'. Almost none of the questions asked in that test include the
'correct' answer (by which I mostly mean optimum answer) in the list
of the choices offered. The worst, and most telling in its
erroneousness, is the question; "How many different kind of loops are
there in JavaScript", for which the multiple choice answers are:-

1. One. The "for" loop
2. Two. The "for" loop and the "while" loop
3. Four. The "for" loop, the "while" loop, the "do...while" loop, and
the "loop...until" loop

- none of which are close (even giving a lot of latitude for
interpretation (is for(;;) the same as for(in)?)).


marss 07-31-2007 01:46 PM

Re: JavaScript knowledge test
 
On 31 , 15:57, "rf" <r...@invalid.com> wrote:
> > I was able to find only this (http://www.w3schools.com/js/

>
> Do not even consider stuff from this source.
>
> Their question 18: The best way to open a new window. Har har :-)
>



What is the correct JavaScript syntax for opening a new window called
"window2" ?
1.window.open("http://www.w3schools.com","window2")

To my shame, I can't see mistake here (not "best way" but ""correct
syntax") :(


marss 07-31-2007 01:47 PM

Re: JavaScript knowledge test
 
On 31 , 16:02, Henry <rcornf...@raindrop.co.uk> wrote:

>
> 1. One. The "for" loop
> 2. Two. The "for" loop and the "while" loop
> 3. Four. The "for" loop, the "while" loop, the "do...while" loop, and
> the "loop...until" loop
>


:) I saw it. I am not going to copypaste without thinking over.

Any link for something more reliable will be appreciated.


Peter Michaux 07-31-2007 03:29 PM

Re: JavaScript knowledge test
 
On Jul 31, 5:24 am, marss <marss...@gmail.com> wrote:
> Maybe anyone know good free online JavaScript knowledge test? This not
> exactly a system for testing online required - it may be simply list
> of questions with variants of answers (I have to prepare tests for
> learners and I need something to be taken as basis).
>
> I was able to find only this (http://www.w3schools.com/js/
> js_quiz.asp), but I need more.


http://blog.meebo.com/?page_id=254

Peter


dhtmlkitchen@gmail.com 07-31-2007 10:56 PM

Re: JavaScript knowledge test
 
On Jul 31, 8:29 am, Peter Michaux <petermich...@gmail.com> wrote:
> On Jul 31, 5:24 am, marss <marss...@gmail.com> wrote:
>
> > Maybe anyone know good free online JavaScript knowledge test? This not
> > exactly a system for testing online required - it may be simply list
> > of questions with variants of answers (I have to prepare tests for
> > learners and I need something to be taken as basis).

>
> > I was able to find only this (http://www.w3schools.com/js/
> > js_quiz.asp), but I need more.

>
> http://blog.meebo.com/?page_id=254
>
> Peter


Jeopardy style:

1. b is a built-in object; not a String or string literal. Define b.
if( b ) {
alert( "if: " + typeof b );
}
else {
alert( "else: " + b );
}
result: alerts "if: false"

2. Define p and q (they are not Strings). Result:
p < q; // false.
p <= q; // true.
p == q; // false.



Richard Cornford 07-31-2007 11:43 PM

Re: JavaScript knowledge test
 
Peter Michaux wrote:
> On Jul 31, 5:24 am, marss wrote:
>> Maybe anyone know good free online JavaScript knowledge
>> test? This not exactly a system for testing online required
>> - it may be simply list of questions with variants of
>> answers (I have to prepare tests for learners and I need
>> something to be taken as basis).
>>
>> I was able to find only this (http://www.w3schools.com/js/
>> js_quiz.asp), but I need more.

>
> http://blog.meebo.com/?page_id=254


When the question of seeking javascript tests on the interment comes up
my imagination usually conjures up an individual who thinks they will be
able to get away with using other people's code and copy-pasting their
way though life, if only they could get a foot through the door.
Preferably into a job where they were the only person creating the
javascript, and so not have anyone looking over their shoulders that
knew what they were doing. The good thing about such a position is that
the people doing the interview would not know what questions they should
be asking and so would likely get any technical test they used off the
Internet themselves. And so a thorough search for such tests, and the
rote learning of the 'correct' answers, might get them past the
technical test and into such a job.

But then I am very cynical.

I have the problem of setting javascript technical tests for interviews
(not that often, but it is part of my job), so form time to time I think
about what questions they should include, and what I would be looking
for in an answer. For example, as a verbal question I would tend to ask;
"which side of an inequality expression is evaluated first?" Not because
I want to be told the answer (I would not memorise that sort of detail
(after all, it does not matter 99.9% of the time), and it would scare me
to encounter someone who did), but because I would want to hear "I would
have to look it up" (or words to that effect), so I could ask where they
would look it up, and if given the correct answer hand them a copy of
the document to see if they were familiar enough with it (and
interpreting it) to give me the correct answer quickly.

On the other hand there are things I would expect someone to know
(without having to look it up), and one of those is Identifier
resolution against the scope chain.

"Inspired" by one of the more ambiguous questions on your meebo.com page
I thought the following might make quite interesting written test
questions, and give an impression of my thought process in setting
javascript questions:-

/* unknown global code */
function outerFunction(){
/* unknown outer function body code */
function innerFunction(){
/* unknown inner function body code */
with(anObjectReference){
x = 5; //<--- The subject line of code.
}
/* more unknown inner function body code */
}
/* more unknown outer function body code */
}
/* more unknown global code */

/* ************************************************** ******\
| Note: Three facts about the 'unknown' code:- |
| |
| 1. There are no more function definitions, no function |
| expressions and no uses of the Function constructor. |
| 2. There are no - with - statements in the unknown code.|
| 3. There are no uses of the - eval - function. |
\************************************************* ******* */


Q1: Assuming the line that reads - x = 5; - is executed, which (group
of) of the following are possible outcomes of its execution?

1. The creation of an 'x' property of the 'outerFunction' function
and the assignment of the value 5 to that property.

2. The assignment of the value 5 to a pre-existing 'x' property of
the 'outerFunction' function.

3. The creation of an 'x' property of the 'innerFunction' function
and the assignment of the value 5 to that property.

4. The assignment of the value 5 to a pre-existing 'x' property of
the 'innerFunction' function.

5. The creation of an 'x' property of the object referred to by
'anObjectReference' and the assignment of the value 5 to that
property.

6. The assignment of the value 5 to a pre-existing 'x' property of
the object referred to by 'anObjectReference'.

7. The creation of a local variable of the 'outerFunction' function
named 'x' and the assignment of the value 5 to that variable.

8. The assignment of the value 5 to a declared local variable of the
'outerFunction' function named 'x'.

9. The creation of a local variable of the 'innerFunction' function
named 'x' and the assignment of the value 5 to that variable.

10. The assignment of the value 5 to a declared local variable of the
'innerFunction' function named 'x'.

11. The creation of a global variable named 'x' and the assignment of
the value 5 to that variable.

12. The assignment of the value 5 to a declared global variable
named 'x'.

13. The creation of an 'x' property of the global object and the
assignment of the value 5 to that property.

14. The assignment of the value 5 to a pre-existing 'x' property of
the global object.

15. The creation of an 'x' property of the window object and the
assignment of the value 5 to that property.

16. The assignment of the value 5 to a pre-existing 'x' property of
the window object.

17. A runtime error.

Q2: If the line of code above is changed from - x = 5; - to - var x =
5 - which (group of) the above are then the possible outcomes of the
execution of that line?

I would have to go over the answers with the candidate taking the test
as there are a number of 'understandable mistakes' to be easily made
here (that is, getting some of them wrong is a certain fail, but others
may need the thinking behind the answer.)

Richard.


David Mark 07-31-2007 11:53 PM

Re: JavaScript knowledge test
 
On Jul 31, 6:56 pm, "dhtmlkitc...@gmail.com" <dhtmlkitc...@gmail.com>
wrote:
> On Jul 31, 8:29 am, Peter Michaux <petermich...@gmail.com> wrote:
>
> > On Jul 31, 5:24 am, marss <marss...@gmail.com> wrote:

>
> > > Maybe anyone know good free online JavaScript knowledge test? This not
> > > exactly a system for testing online required - it may be simply list
> > > of questions with variants of answers (I have to prepare tests for
> > > learners and I need something to be taken as basis).

>
> > > I was able to find only this (http://www.w3schools.com/js/
> > > js_quiz.asp), but I need more.

>
> >http://blog.meebo.com/?page_id=254

>
> > Peter

>
> Jeopardy style:
>
> 1. b is a built-in object; not a String or string literal. Define b.
> if( b ) {
> alert( "if: " + typeof b );
> }
> else {
> alert( "else: " + b );
> }
> result: alerts "if: false"


I'll have to think about this one for a moment.

>
> 2. Define p and q (they are not Strings). Result:
> p < q; // false.
> p <= q; // true.
> p == q; // false.


p = 0;
q = null;


Richard Cornford 08-01-2007 12:21 AM

Re: JavaScript knowledge test
 
dhtmlkitchen@gmail.com wrote:
> On Jul 31, 8:29 am, Peter Michaux wrote:
>> On Jul 31, 5:24 am, marss wrote:
>>
>>> Maybe anyone know good free online JavaScript knowledge
>>> test? This not exactly a system for testing online
>>> required - it may be simply list of questions with
>>> variants of answers (I have to prepare tests for
>>> learners and I need something to be taken as basis).

>>
>> > I was able to find only this (http://www.w3schools.com/js/
>> > js_quiz.asp), but I need more.

>>
>> http://blog.meebo.com/?page_id=254
>>
>> Peter

>
> Jeopardy style:
>
> 1. b is a built-in object; not a String or string literal.
> Define b.
> if( b ) {
> alert( "if: " + typeof b );
> }
> else {
> alert( "else: " + b );
> }
> result: alerts "if: false"


Given the definition of "built-in object" in ECMA 262, 3rd Ed. Section
4.3.7, and especially the words "Every built-in object is a native
object", and the definition of - typeof - operator in section 11.4.3,
where all 'native' objects must result in the strings 'object' or
'function' when used as a operand of - typeof -, are you sure you are
not testing for knowledge of implementation bugs here?

> 2. Define p and q (they are not Strings). Result:
> p < q; // false.
> p <= q; // true.
> p == q; // false.


What about the execution order of these tests, as a strict adherence to
the order shown greatly expands the possibilities?

Richard.



All times are GMT. The time now is 01:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.