Hi All some great discussions going on, getting some good questions!
Keep them coming!
Hi All some great discussions going on, getting some good questions!
Keep them coming!
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.
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
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.
@connor4312 ; Some nice questions there. 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.
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=ââ> if ya want nowadays.
Yeah, Iâd expect to see a:target there or something similar.
Actually Poes, I was thinking something more like: <p id=â<!â<a><div>http://html5sucks.org/</div></a>-->â></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.
Connor your questions were good!
Anymore would be awesome
Also what was the answer to the last question, im sure everyone would like to know
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.