Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Javascript / computer science pub quiz

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
Avatar for Alexandre Alexandre
October 03, 2017

Javascript / computer science pub quiz

These are the slides for a javascript / computer science pub quiz that happened for the reactivate London meetup.

Avatar for Alexandre

Alexandre

October 03, 2017

Other Decks in Programming

Transcript

  1. Inside which HTML element can we put JavaScript code? A.

    <scripting> B. <script> C. <javascript> D. <js> 1.
  2. Which of the following is not a pattern to handle

    asynchronous operations? A. Callbacks B. Closure C. Promises D. Generator 2.
  3. Which of the following are NOT JavaScript data structures in

    ES.next? • Map • Set • List • Record 3. • Array • Tree • Object • Dictionary
  4. Which of the following do NOT execute a function? 4.

    fn.bind(this, ...args) fn.call(this, ...args) fn.apply(this, ...args) fn() A. B. C. D.
  5. What is the process called by which unused ES Modules

    are automatically removed from a bundle? 5.
  6. Which project gained more than 25K stars on GitHub in

    2016? A. React B. Vue C. Angular 2 D. Yarn 6.
  7. Sort these packages by number of downloads for the last

    month. 7. • React • Express • Request • Underscore • Backbone
  8. What is the data structure of the Virtual DOM? A.

    Tree B. Hashmap C. Stack D. Heap 8.
  9. Which of the following are NOT module bundlers? • Webpack

    • Rollup • Yarn • Browserify • Require.js 10.
  10. What sentence would the following HTML&CSS code spell out? 3.

    <div class="main"> <div>my</div> <div>name</div> <div>is</div> <div>confusing</div> </div> .main { display: flex; flex-direction: row-reverse; } .main div:nth-child(2) { order: -1; } .main div:nth-child(1):before { content: "not"; }
  11. What do the following expressions evaluate to? 4. typeof NaN

    typeof null typeof Object typeof [] A. B. C. D. E. typeof +"3"
  12. Which of the following typically don’t compile or transpile to

    JavaScript? 5. • Purescript • Elm • Turboscript • Reason • TypeScript • AssemblyScript
  13. What does the following code print to stdout? 6. (function

    fn() { console.log(arguments.map); })();
  14. Which of the following expressions are truthy? 7. null "0"

    [].length undefined A. B. C. D. E. "hello world" F. {}
  15. What does the following evaluate to in JavaScript? 8. const

    a = [1, 2, 3]; const b = a; const c = b.slice(); a === b && a === c
  16. What does the following code evaluate to in Node 8?

    9. const fn = (x = 2) => x; fn() + fn(1)
  17. Which of the following Array methods don’t mutate the original

    array? 10. • concat • splice • slice • pop • push • shift • unshift
  18. What does the following code evaluate to? 11. (function() {

    function f() { return 1; } return f(); function f() { return 2; } })();
  19. Link each JavaScript engine to the browsers that are using

    them 3. A. Chakra B. JavaScriptCore C. V8 D. SpiderMonkey 1. Edge 2. Safari 3. Chrome 4. Chromium 5. Opera 6. Firefox
  20. Link each web browser engine to the browsers that are

    using them 4. A. Webkit B. Blink C. Gecko D. EdgeHTML 1. Edge 2. Safari 3. Chrome 4. Chromium 5. Opera 6. Firefox
  21. Which of the following browsers has its engine written in

    Rust? A. Chrome B. Opera Neon C. Servo D. Edge 5.
  22. What is the time complexity for finding a value in

    a binary tree? A. O(log n) B. O(n) C. O(n2) D. O(1) 2.
  23. Which of the following could one use to find the

    quickest path in a graph? A. Quick Sort B. Fourier Transformation C. Secure Hash D. Dijkstra 3.
  24. What is the output of the following code? A. 6

    B. 8 C. 10 D. TypeError 4. const compose = (...fns) => input => fns .reverse() .reduce((prev, fn) => fn(prev), input) compose(x => x + 2, x => x + 4)(4)
  25. What functional pattern is being applied in the following snippet?

    A. Composition B. Monoids C. Recursion D. Currying 5. const addBase = base => num => base + num;
  26. Which of the following is a valid Haskell function type

    definition? 6. length:: [a] -> Int length: (arr: number[]) => number public int length(int[] values) {} A. B. C.
  27. Which of the following languages has a lisp-like syntax? A.

    Java B. C++ C. Clojure D. Haskell E. Rust 7.
  28. Which of the following are NOT dependencies of create-react- app?

    5. • Autoprefixer • Gulp • dotenv • Enzyme • babel-core • Redux • left-pad • chalk
  29. When <B/> replaces <A/> which method is called first in

    React 16? • componentWillUnmount of <A/> • componentWillMount of <B/> 8.
  30. What would one typically use WebWorkers for? A. Execute code

    in a segregated environment / thread B. Access and modify the DOM asynchronously C. Support offline (-first) experiences 9.
  31. Name three places where Reactivate has been held previously 2.

    (Points will only be awarded for all three)