Javascript Bootcamp is a hands-on tutorial and reference manual with comprehension test for both beginners and pros. It teaches Javascript's foundational concepts and techniques which serve as the basis for creating web and mobile apps. But before diving into the book, it's recommended to take first the included JSAT to gauge your current level of comprehension or proficiency in Javascript.If you're satisfied with your performance in the JSAT, you don't really need to take this course. The Javascript Assessment Test (65 questions) Time limit: 30 minutes (All answers found at end of book) Select the best answer for each question. 1. The line or statement below creates a new context. eval?.("'use strict'; function f(){console.log('hello')}") a. true b. false 2. Under non-strict mode, a statement x = 40 performs what action? a. variable declaration b. variable assignment c. variable declaration or assignment d. variable declaration and assignment e. none of the above 3. What best describes the type of relationship between the variable named i and the anonymous function in the code below: var a = []; for (var i=0; i<5; ++i){ a[i] = function(){ console.log(i); } } a. one-to-one b. one-to-many c. many-to-one d. many-to-many e. none of the above 4. Which of the options below would solve the script error? function f(){ this.msg = "hello" } f.prototype.greet = function(name){ console.log(`${this.msg}, ${name}`) } } const obj = new f() setTimeout(obj.greet, 1000, "world!") a. iteration or recursion b. block or constant variable c. function wrapper or reference d. call or apply method e. none of the above 5. The var keyword creates properties on the window object. a. true b. false 6. Every object instance has a prototype property. a. true b. false 7. The strict mode is automatically in effect for a given script. a. true b. false 8. Using the let keyword creates properties on the global object. a. true b. false 9. How many closures or contexts are created in the given script? var list = []; f(); list.forEach(fn=>fn()); function f(){ var strings = ["romeo", "sierra", "tango"]; for (let i = 0; i < 3; i++){ list[i] = ()=>console.log(list[i], strings[i]); } } a. 5 b. 9 c. 1



Klappentext

Javascript Bootcamp is a primer and exam prep on a fun and popular computer language. Become competent and confident enough in Javascript to create web and mobile apps, as well as to work with libraries and frameworks like JQuery, node.js and React. The book includes The Javascript Proficiency Test (30+ questions) to check your understanding of the subject. The Javascript Proficiency Test Select the best answer from the given choices for each question. 1. A block variable has a default value if not initialized. a. true b. false 2. Under strict mode, in order to prevent an error message, a function should declare a variable with the keyword: a. static b. vars c. const d. dim e. none of the above 3. When a variable already exists even before its formal declaration, this is known as: a. currying b. hoisting c. instantiation d. closure e. preprocessing 4. A function by default returns 0 if no return value was specified. a. true b. false 5. Redeclaring a global variable doesn't cause an error. a. true b. false 6. How many variables are created by the invocation to f? function f() { let x = 1; { let x = 2; console.log(x); } console.log(x); } f(); a. 3 b. 2 c. 4 d. 1 e. none of the above 7. Given the code below, which statement is true? function go(n) { m=777; n=888; console.log(n); } go({a: [1, 2, 3]}); console.log(m); console.log(n); a. m and n are both local variables b. m and n are both global variables c. m is global and n is local d. m is local and n is global e. none of the above 8. A constant variable can optionally declare an initial value. a. true b. false 9. let can create properties on the window object. a. true b. false 10. How many variables exist while f is running? var y = 3; var x = 0; function f() { var x = y; Table of Contents Chapter 1 A Hands-on Overview of Javascript Form of a script Executing a script Javascript console Javascript debugger Inspector Chapter 2 Data types Primitives and Object types typeof Chapter 3 Variables Declaring variables Strict vs. non-strict mode Variable hoisting Arrays Block scope Chapter 4 Control flow if-else while, do-while, for switch Chapter 5 Operators Arithmetic operators Assignment operator Increment and decrement operators Logical operators Grouping operator Comparison operators Relational operators Ternary operator Chapter 6 Functions Functi

Titel
Javascript Bootcamp
Untertitel
Primer and Exam Prep
EAN
9781387183999
Format
E-Book (epub)
Hersteller
Veröffentlichung
23.08.2017
Digitaler Kopierschutz
frei
Dateigrösse
0.32 MB