SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 67

Hybrid View

  1. #1
    Galactic Overlord gold trophysilver trophybronze trophy
    HAWK's Avatar
    Join Date
    Aug 2003
    Location
    New Zealand
    Posts
    12,540
    Mentioned
    956 Post(s)
    Tagged
    14 Thread(s)

    We Need Quiz Questions for Our New Site - QuizPoint

    One of our recent Triple Time creations is a fun little project called Quizpoint - a quiz site for web geeks.

    In order to keep the site entertaining and challenging, we need as many questions as we can source, which is where you guys come in.

    We're looking for JavaScript, Ruby and WordPress questions of all difficulty levels. If you can think of any, post them in this thread, along with the answer and we'll put them up on the site.

    While you're at it, check Quizpoint out and see just how smart you are!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    This is a fun idea! I've already tried a quiz, and it was fun.

    Here's a simple JS one:

    When linking to a script, which of these is the best option for the type attribute?

    type="javascript"

    type="script"

    type="text/javascript"

    These days, you don't need it at all
    Answer: These days, you don't need it at all

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Another JS one:

    Which of these is NOT a valid comment in JavaScript:

    // This is a comment.

    /* This is a comment. */

    /* This is a comment.

    <!-- This is a comment.
    Answer:

    /* This is a comment
    Last edited by ralph.m; Dec 10, 2012 at 17:51. Reason: ammemded option 4 to <!--

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Another JS question:

    Which statement best explains what "unobtrusive JavaScript" is?

    JavaScript that doesn't annoy users

    JavaScript that is separate from HTML

    JavaScript that does not affect a web page

    JavaScript that works even with scripting turned off
    Answer: JavaScript that is separate from HTML

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Another JS one (might need to be checked/re-phrased by a JS expert, though, like those above):

    Given an element assigned to a variable "child", which of the following could be used as part of a script to remove the padding on the child's parent element?

    child[i].parentNode.style.padding = "0";

    child.parentNode.style.padding = "0";

    child[i].parentNode.padding = "0";

    child.parentNode.style.padding = none;
    Answer: child[i].parentNode.style.padding = "0";

    (Comment: You can't use child.parentNode since the child element will be a NodeList, not a single Node—even if there is only one such child element in the document.)

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Another JS question:

    How will the following code be output?

    var text = "Statement one
    Statement two
    Statement three";
    console.log(text);


    Uncaught Syntax Error: Unexpected token ILLEGAL

    Statement one
    Statement two
    Statement three

    Statement oneStatement twoStatement three

    Statement one Statement two Statement three
    Answer: Uncaught Syntax Error: Unexpected token ILLEGAL

    Explanation: You cannot create a string that spans multiple lines in JavaScript.

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    <! This is a comment.
    Did you mean
    <!-- This is a comment.
    ?
    Simon Pieters

  8. #8
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    zcorpan I figured he meant what Microsoft considered a comment.

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by zcorpan View Post
    Did you mean
    <!-- This is a comment.
    Egad, you are right, I made a typo. Thanks for spotting it. Hope it hasn't made it into the system yet. Sorry @James08 ! Ammended question here: http://www.sitepoint.com/forums/show...=1#post5257191

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,812
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Regarding the type= question for JavaScript perhaps a better one would be to ask what the standard specifies is the correct type to use when you do specify it.

    The answer is of course type="application/javascript" since text/javascript was deprecated many years ago and only needs to be used in pages where you want to allow the code to be run as jScript where the browser doesn't support JavaScript - for example in IE8.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  11. #11
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why dont need that? Thanks, please give me some review about my site <snip>

    Quote Originally Posted by ralph.m View Post
    This is a fun idea! I've already tried a quiz, and it was fun.

    Here's a simple JS one:



    Answer: These days, you don't need it at all
    Last edited by TechnoBear; Jan 8, 2013 at 10:12. Reason: Review requests in review forum only

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Here's another simple JS one:

    The following code

    Code:
    "two" > "three"
    will evaluate to:


    true

    false

    undefined

    an error
    Answer: true. (Reason: alphabetically, "two" is greater than (i.e. later in the dictionary than) "three".)

    [Perhaps a JS person can suggest better options here.]

  13. #13
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Found a question with an incorrect answer. It was about the nth-child selector, with 3n+1. It claimed the answer was 'The first row, then every fourth row' which is wrong. 'Every third row' is the most accurate there, but it said that was incorrect.

  14. #14
    SitePoint Member James08's Avatar
    Join Date
    Dec 2012
    Posts
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi Stormrider,
    Nice find, seems someones made a typo.

    All fixed up!

    Thanks for your time

  15. #15
    SitePoint Wizard masm50's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    2,508
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Slightly off topic - but what did you use to build Quizpoint? Did you base it on any CMS or build it in house completely?

  16. #16
    SitePoint Member James08's Avatar
    Join Date
    Dec 2012
    Posts
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by masm50 View Post
    Slightly off topic - but what did you use to build Quizpoint? Did you base it on any CMS or build it in house completely?
    Hi masm50,
    All questions are welcome, trying to make as much of a fun learning experience as possible
    No, quizpoint isn't based on any CMS's its completely built in house, using backbone.js

    Thanks for your time, and using Quizpoint.com

  17. #17
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The site doesn't function without JavaScript. You just see a nice "loading..." text and even the site feedback won't work without JavaScript so I'll give the feedback here instead.

  18. #18
    SitePoint Member James08's Avatar
    Join Date
    Dec 2012
    Posts
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    The site doesn't function without JavaScript. You just see a nice "loading..." text and even the site feedback won't work without JavaScript so I'll give the feedback here instead.
    Hi xhtmlcoder,
    Yes at the moment the site will only work with javascript, still in early stages of development

    Thanks for you time

  19. #19
    SitePoint Member James08's Avatar
    Join Date
    Dec 2012
    Posts
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi All some great discussions going on, getting some good questions!

    Keep them coming!

  20. #20
    Galactic Overlord gold trophysilver trophybronze trophy
    HAWK's Avatar
    Join Date
    Aug 2003
    Location
    New Zealand
    Posts
    12,540
    Mentioned
    956 Post(s)
    Tagged
    14 Thread(s)
    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.

  21. #21
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    32
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    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

  22. #22
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    JavaScript scope is always a good thing to learn

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

    Code:
    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
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  23. #23
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by AussieJohn View Post
    JavaScript scope is always a good thing to learn
    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?

  24. #24
    Hibernator YuriKolovsky's Avatar
    Join Date
    Nov 2007
    Location
    Malaga, Spain
    Posts
    1,072
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Loving all your questions ralph

  25. #25
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by YuriKolovsky View Post
    Loving all your questions ralph
    Thanks, Timo ... though I bet you could come up with better ones.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •