473,700 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 31 '07 #1
60 5008
rf

"marss" <ma******@gmail .comwrote in message
news:11******** **************@ l70g2000hse.goo glegroups.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

Jul 31 '07 #2
On 31 , 15:57, "rf" <r...@invalid.c omwrote:
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.c om","window2" )

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

Jul 31 '07 #3
On 31 , 16:02, Henry <rcornf...@rain drop.co.ukwrote :
>
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...unt il" loop
:) I saw it. I am not going to copypaste without thinking over.

Any link for something more reliable will be appreciated.

Jul 31 '07 #4
On Jul 31, 5:24 am, marss <marss...@gmail .comwrote:
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

Jul 31 '07 #5
On Jul 31, 8:29 am, Peter Michaux <petermich...@g mail.comwrote:
On Jul 31, 5:24 am, marss <marss...@gmail .comwrote:
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.
Jul 31 '07 #6
On Jul 31, 6:56 pm, "dhtmlkitc...@g mail.com" <dhtmlkitc...@g mail.com>
wrote:
On Jul 31, 8:29 am, Peter Michaux <petermich...@g mail.comwrote:
On Jul 31, 5:24 am, marss <marss...@gmail .comwrote:
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;

Jul 31 '07 #7
On Jul 31, 7:43 pm, "Richard Cornford" >
/* unknown global code */
function outerFunction() {
/* unknown outer function body code */
function innerFunction() {
/* unknown inner function body code */
with(anObjectRe ference){
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.
Dunno.
>
2. The assignment of the value 5 to a pre-existing 'x' property of
the 'outerFunction' function.
function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}
}
innerFunction()
}
outerFunction.x = 0
var anObjectReferen ce = outerFunction;
outerFunction() ;

>
3. The creation of an 'x' property of the 'innerFunction' function
and the assignment of the value 5 to that property.
Dunno.
>
4. The assignment of the value 5 to a pre-existing 'x' property of
the 'innerFunction' function.
function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}
}

innerFunction.x = 0
var anObjectReferen ce = innerFunction;

innerFunction() ;

}
outerFunction() ;

>
5. The creation of an 'x' property of the object referred to by
'anObjectRefere nce' and the assignment of the value 5 to that
property.
Dunno.
>
6. The assignment of the value 5 to a pre-existing 'x' property of
the object referred to by 'anObjectRefere nce'.
function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}
}
innerFunction() ;
}

var anObjectReferen ce = new Object();
anObjectReferen ce.x = 0;
outerFunction() ;

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

function outerFunction() {
var anObjectReferen ce = new Object();
var x;
function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}
}
innerFunction() ;
}

outerFunction() ;
>
9. The creation of a local variable of the 'innerFunction' function
named 'x' and the assignment of the value 5 to that variable.
Dunno.
>
10. The assignment of the value 5 to a declared local variable of the
'innerFunction' function named 'x'.
function outerFunction() {
var anObjectReferen ce = new Object();

function innerFunction() {
var x;
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}
}
innerFunction() ;

}

outerFunction() ;
>
11. The creation of a global variable named 'x' and the assignment of
the value 5 to that variable.
var anObjectReferen ce = this;

function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}

}
innerFunction()
}

outerFunction() ;
>
12. The assignment of the value 5 to a declared global variable
named 'x'.
var x;
var anObjectReferen ce = this;

function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}

}
innerFunction()
}

outerFunction() ;

>
13. The creation of an 'x' property of the global object and the
assignment of the value 5 to that property.
Same as 11.
>
14. The assignment of the value 5 to a pre-existing 'x' property of
the global object.
Same as 12.
>
15. The creation of an 'x' property of the window object and the
assignment of the value 5 to that property.
Same as 11.
>
16. The assignment of the value 5 to a pre-existing 'x' property of
the window object.
Same as 12.
>
17. A runtime error.
var anObjectReferen ce;

function outerFunction() {

function innerFunction() {
with(anObjectRe ference){
x = 5; //<--- The subject line of code.
}

}
innerFunction()
}

outerFunction() ;

>
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?
9.

And perhaps that one was a trick question. I'm starting to wonder if
any of the "dunno" scenarios above are even possible.

Since I never use with clauses, this test would be a nightmare for
me. And yes, I verified some of my answers with alerts. All but a
couple were correct (and I corrected those that weren't.)

And aren't with clauses supposed to be taboo in JS?
>
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.)
I figure I failed, but this seems more of an academic exercise than a
practical test (and I am no expert on the guts of ECMAScript.) This
is reinforced by the fact that I haven't used a single with clause in
ten years of scripting Web pages/applications. I've exploited
closures once (thanks to a tip in one of your articles) and I never
nest functions in functions. I've never found a practical need to do
any of these things. Furthermore, using closures, nested functions,
etc. would seem a bad idea if you consider the people who have to
maintain the code in the future (most of whom will likely be the
incompetent clipboard jockeys you alluded to in your preface.)

Aug 1 '07 #8
marss said the following on 7/31/2007 8:24 AM:
Maybe anyone know good free online JavaScript knowledge test?
What is ECMAScript and how often do you refer to it while writing an
actual script?

Anybody that has read more than 2 of my posts with regards to ECMAScript
can pretty much figure out my answer to that question. And, how that
question might have relevance to the value of a person to me as a
programmer.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 1 '07 #9
On Aug 1, 12:15 am, Peter Michaux <petermich...@g mail.comwrote:
[snip]
David Mark posted nice answers. I really enjoyed this as an exercise.
Thanks Peter. Of course, I didn't read the instructions carefully or
I would have realized that my suspicions about the impossibility of
some of the outcomes were part of the design. I was trying to come up
with code to make each outcome a reality (and gave up on 1, 3, 5, 7
and 9), when I should have taken a cue from the instructions and
expected some of them were going to be impossible. Apparently this
was a true/false exam with an obvious numbering pattern, but I was
treating it like an essay test. In the intended context, all of my
answers to the false questions were wrong as they will certainly be
interpreted as "I don't know if this is true or false."

Aug 1 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
4222
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is avaliable at... http://www.geocities.com/binnyva/code/javascript/advanced_tutorial/ If any of you could spare the time, please have a look at my tutorial
136
9388
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
0
8714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7797
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6557
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2021
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.