NottsJS Logo

☃️ Christmas🎄 Quiz

  • Teams of 3 to 5
  • 60 seconds per question
  • NO CHEATING
  • Write down your answer of A, B, C or D

GET READY

GET SET

GO

Part 1

Question 1

Brendan Eich was hired by Netscape Communications in 1995 with the task of embedding which programming language into the Netscape Navigator browser?

  1. Java
  2. JavaScript
  3. Scheme
  4. Something else

Question 2


              var bauble = 'red', tinsel = bauble = typeof tinsel
            

What is the value of tinsel?

  1. 1
  2. number
  3. undefined
  4. Error

Question 3


              typeof (() => 23)()
            

What is the result?

  1. number
  2. string
  3. function
  4. Error

Question 4


              var children = ['Mary','Tom','Helen','Paul','Barry'],
                  r = /(\S).*\1/
              var naughtyList = children.filter(name => r.test(name))
            

Who is on the naughtyList?

  1. Mary, Tom, Helen, Paul, Barry
  2. Nobody
  3. Mary, Helen
  4. Helen, Barry

Question 5

LiveScript was first shipped in beta releases of Netscape Navigator 2.0. When was it later renamed to JavaScript?

  1. beta 1
  2. beta 2
  3. beta 3
  4. on release

Question 6


              function santa() {
                return
                {
                  hungry: true
                }
              }
              const x = typeof santa()
            

What is the value of x?

  1. function
  2. number
  3. object
  4. undefined

Question 7


              "1" - - "1"
            

What is the result??

  1. 0
  2. 2
  3. 11
  4. "11"

Question 8


              const reindeer = ['Dasher','Dancer','Prancer']
              reindeer.length = 0
              reindeer.push(...['Vixen','Comet'])
            

What is the value of reindeer?

  1. Dasher, Dancer, Prancer
  2. Dasher, Dancer, Prancer, Vixen, Comet
  3. Vixen, Comet
  4. empty

Question 9


              function elf(name, age) {
                arguments[1] = 22
                return age
              }
              const elfy = elf('Elf')
            

What is the value of elfy?

  1. 22
  2. Elf
  3. undefined
  4. ReferenceError

Question 10


              with ((x, undefined) => ['elf','reindeer','tree']) length
            

What is the result?

  1. 1
  2. 2
  3. 3
  4. undefined

Question 11


              (true + false) > 2 + true
            

What is the result?

  1. true
  2. false
  3. TypeError
  4. NaN

Question 12


              var presents = 3,
                  sack = {}
              sack: {
                presents: 2
                gifts: ++presents
              }
              sack.gifts + sack.presents + presents
            

What is the result?

  1. ReferenceError
  2. 9
  3. undefined
  4. NaN

Question 13


              const socks = 1
              (new ((socks) => socks)(2))()
            

What is the result?

  1. 1
  2. 2
  3. undefined
  4. TypeError

Question 14


              var cake = []
              cake[0] = 'raisins'
              cake[1] = 'brandy'
              cake.cooked = true
              const quantity = cake.length
            

What is the value of quantity?

  1. 1
  2. 2
  3. 3
  4. undefined

END OF PART 1

GET READY

GET SET

GO

Part 2

Question 15


              new String('Santa Claus') instanceof String
            

What is the result?

  1. true
  2. false
  3. undefined
  4. TypeError

Question 16

In what year did server-side JavaScript first appear?

  1. 1995
  2. 1998
  3. 2005
  4. 2009

Question 17


              var forecast = ['ice', 'snow', 'sleet']
              '2' in forecast
            

What is the result?

  1. true
  2. false
  3. undefined
  4. ReferenceError

Question 18


              'This is a string' instanceof String
            

What is the result?

  1. true
  2. false
  3. TypeError
  4. ReferenceError

Question 19


              function sleigh() {
                return boots
                boots = 10
                function boots() { laces = 'tied' }
                var boots = 'warm'
              }
              typeof sleigh()
            

What is the result?

  1. number
  2. function
  3. undefined
  4. string

Question 20


              new Array(5).toString()
            

What is the result?

  1. ",,,,"
  2. ""
  3. ",,,,,"
  4. "array"

Question 21


              String('Chimney') === 'Chimney'
            

What is the result?

  1. true
  2. false
  3. undefined
  4. 'Chimney'

Question 22


              (() => typeof arguments)()
            

What is the result?

  1. array
  2. object
  3. Array
  4. undefined

Question 23


              (function () { return typeof arguments })()
            

What is the result?

  1. array
  2. object
  3. Array
  4. undefined

Question 24


              10 > 9 > 8 === true
            

What is the result?

  1. true
  2. false
  3. ParserError
  4. 1

Question 25


              var santa = 'chilly', check, grotto = {
                santa: 'missing',
                status: check = function() {
                  return this.santa
                }
              }
              console.log(check(), grotto.status())
            

What is logged?

  1. missing
  2. chilly
  3. chilly missing
  4. missing chilly

Question 26


              NaN === NaN
            

What is the result?

  1. true
  2. false
  3. TypeError
  4. ParserError

Question 27


              [] + [] + 'blitzen'.split('')
            

What is the result?

  1. "b,l,i,t,z,e,n"
  2. TypeError
  3. ['b','l','i','t','z','e','n']
  4. ['','','b','l','i','t','z','e','n']

Question 28


              var cookies = 0
              function delivery() {
                cookies++
                this.cookies = cookies
                return delivery
              }
              var reward = new new delivery
            

What is the value of reward.cookies?

  1. 2
  2. 1
  3. 0
  4. undefined

FIN

Give your answer sheet to a team near you

Take the answer sheet from a different team

Get ready to start marking answers ✅

(note to self: restart quiz and enable answers)