Reader small image

You're reading from  Hands-on JavaScript for Python Developers

Product typeBook
Published inSep 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838648121
Edition1st Edition
Tools
Right arrow
Author (1)
Sonyl Nagale
Sonyl Nagale
author image
Sonyl Nagale

Chicago-born, Iowa-raised, Los Angeles-seasoned, and now New York City-flavored, Sonyl Nagale started his career as a graphic designer focusing on web, which led down the slippery slope to becoming a full-stack technologist instead. With an eye toward the client use case and conversation with the creative side, he prides himself on taking a holistic approach to software engineering. Having worked at start-ups and global media companies using a variety of languages and frameworks, he likes solving new and novel challenges. Passionate about education, he's always excited to have great teachable moments complete with laughter and seeing the Aha! moments in students eyes.
Read more about Sonyl Nagale

Right arrow

Questions

For the following questions, select the correct option:

  1. JavaScript is inherently:
    1. Synchronous
    2. Asynchronous
    3. Both
  2. A fetch() call returns a:
    1. then
    2. next
    3. finally
    4. Promise
  1. With prototypal inheritance, we can (select all):
    1. Add methods to a base data type.
    2. Subtract methods from a base data type.
    3. Rename our data type.
    4. Cast our data into another format.
let x = !!1
console.log(x)
  1. From the preceding code, what will be the expected output?
    1. 1
    2. false
    3. 0
    4. true
const Officer = function(name, rank, posting) {
this.name = name
this.rank = rank
this.posting = posting
this.sayHello = () => {
console.log(this.name)
}
}

const Riker = new Officer("Will Riker", "Commander", "U.S.S. Enterprise")
  1. In the preceding code, what's the best way to output Will Riker?
    1. Riker.sayHello()
    2. console.log(Riker.name)
    3. console.log(Riker.this.name)
    4. Officer.Riker.name()

    lock icon
    The rest of the page is locked
    Previous PageNext Page
    You have been reading a chapter from
    Hands-on JavaScript for Python Developers
    Published in: Sep 2020Publisher: PacktISBN-13: 9781838648121

    Author (1)

    author image
    Sonyl Nagale

    Chicago-born, Iowa-raised, Los Angeles-seasoned, and now New York City-flavored, Sonyl Nagale started his career as a graphic designer focusing on web, which led down the slippery slope to becoming a full-stack technologist instead. With an eye toward the client use case and conversation with the creative side, he prides himself on taking a holistic approach to software engineering. Having worked at start-ups and global media companies using a variety of languages and frameworks, he likes solving new and novel challenges. Passionate about education, he's always excited to have great teachable moments complete with laughter and seeing the Aha! moments in students eyes.
    Read more about Sonyl Nagale