We Need Quiz Questions for Our New Site - QuizPoint

Hi All some great discussions going on, getting some good questions!

Keep them coming! :slight_smile:

In case anyone is wondering, @James08; is part of our grad program and has been tasked with the job of QuizPoint Product Manager. This thread was his idea, and I think it was a stroke of genius. :slight_smile:

CSS

Q) How would you select a group of <p> tags which were preceded, somewhere in the element, by an <h1> tag?
A) h1 p B) h1 ~ p C) h1 + p D p + h1

Q) How would you select select all <a> tags containing an external link?
A) a[href^=“http”] B) a[href=“http” C) a[href~=“http”] D) a[href=external]

Q) What selector would you use in order to create an anchor-based pure CSS accordion menu?
A) a:hover B) a:visited C) a:clicked D) a:active

Javascript:

Q) What function would you use in order to create a clock?
A) window.tick() B) delay() C) window.setInterval D) window.time.increment()

Q) How would you check if a number is event?
A) A) if (Math.round(x/2) == x/2) B) if (int x/2) C) if (!int(x/2)) D) if (Math.even(x/2))

Q) What would be the most efficient method to create a grid in Javascript?
A) while loops B) for loops C) double-value loop D) do loops

Wordpress:

Q) What is the first page in the stack for viewing a single post with an attachment?
A) $subtype.php B) $type.php C) $mimetype.php D) $mimetype_$subtype.php

Q) What recently launched feature for Wordpress that, among other things, adds in-house user tracking?
A) Booster B) Analytical C) Wordpress Cloud D) Jetpack

Q) What is the default URL structure of single posts?
A) ./day/month/year B) ./post-title C)./year/month/day D) ./category/post-title/post-id

JavaScript scope is always a good thing to learn :slight_smile:

In the following example, what is the value of “x” in in the alerts?


var x = 10;

function hello() {
    var x = 5;
    alert(x);
}

hello();

alert(x);

a) 10, 10
b) 5, 5
c) 5, 10
d) 10, undefined

A nicely constructed question, John. I was musing on a concise example of this, but yours is perfect. :slight_smile:

@connor4312 ; Some nice questions there. :slight_smile: What’s the answer to the last one?

Loving all your questions ralph

Thanks, Timo … though I bet you could come up with better ones. :slight_smile:

I think this would make a more interesting version of the alerts question

"use strict";
x = 10;

function hello() {
    var x = 5;
    alert(x);
}

hello();

alert(x);

a) 10, 10
b) 5, 5
c) 5, 10
d) syntax error because the code doesn’t declare the global variable x before trying to use it.

or possibly this one.

Assume that the browser is Opera and that you check the checkbox in each alert before pressing the OK button.

"use strict";
var x = 10;

function hello() {
    var x = 5;
    alert(x);
}

hello();

alert(x);

a) 10, 10
b) 5, 5
c) 5, 10
d) 5 and then nothing because JavaScript is disabled before returning from the first alert.

If it only worked with :active then you’d only see the accordion opening while the user is holding down the button. :active states don’t stay.

Unless I’m missing something.

Felgall thanks for the correction of indexOf.

That’s a neat site.

Are you looking for questions about plain Ruby or more about Rails?

I have pondered your questions deeply.

Lawlz yeah you can have
<div id=“:heart:”> if ya want nowadays.

Yeah, I’d expect to see a:target there or something similar.

That’s a question for @HAWK and/or @James08

Actually Poes, I was thinking something more like: <p id=“<!–<a><div>http://html5sucks.org/&lt;/div&gt;&lt;/a&gt;--&gt;”></p> for a valid HTML5 id attribute value.

That’s the second best demonstration of HTML 5 stupidity that I have come across so far. The best being the “mandatory empty” input field definition at the bottom of my sig.

Hi, Pullo.

Questions about ruby on rails would be awesome!

Ah never mind…

Don’t be put off. Your questions were good. :slight_smile:

Connor your questions were good!

Anymore would be awesome :slight_smile:

Also what was the answer to the last question, im sure everyone would like to know :wink:

Another JavaScript question:

Consider the following code:


function hello( str1, str2 ) {
    console.log( str1 + " " + str2 );
}

hello.call(this, "hello", "world");

Why do we use call() to invoke this function?

a) This is how all functions are invoked.
b) To pass in the “this” parameter.
c) To pass in a scope variable (this) and 0 or more arguments
d) You can’t invoke a function this way.