A closure is a function that returns a function with its own scope. In TypeScript, it's able to access the outer scope of the parent function so that you can sort of carry around data by calling that function over and over again. The big example is always like a counter, right? You have a function called make counter, and then that returns an increment function. Every single time you run that increment function, it still has access to this invisible variable of the upper scope.
In this episode of Syntax, Wes and Scott try to stump each other with questions about JavaScript, HTTP status error codes, memory safety, and a bit of web history thrown in.
Show Notes
- 00:11:07 Welcome
- Displaced Gamers
- 00:46:00 In which year was JavaScript introduced?
- 02:59:16 What status code is returned by server when a resource isn’t found?
- 03:32:00 Which http status code indicates the client must authenticate itself?
- 04:34:17 What is a pseudo class and give an example?
- 05:15:11 What JavaScript function allows you to delay the execution of a function?
- 06:02:06 Who first proposed using separate style sheet language for the web?
- 08:08:14 Which of the following statements about JavaScript strict are true?
- 08:50:11 What is event driven programming in Node.js?
- 10:26:08 In GraphQL, how do you mark a field as deprecated?
- 10:47:24 How does xHTML differ from HTML?
- 11:48:21 Which of the following statements is true about objects in JavaScript?
- 13:20:19 What is a type erase in TypeScript?
- 14:21:23 In TypeScript which syntax can be used to define a user defined type guard?
- 16:02:12 What is a closure in JavaScript?
- 17:40:00 Which node.js module provides asynchronus file I/O?
- 18:54:08 What does memory safety mean?
- 21:57:11 What does http2 introduce to improve speed?
- 23:58:05 What are strategies for optimizing HTML5 video?
- 26:28:11 Which of the following is not a correct way to create a new object?
- 28:13:20 What is the difference between function declaration and function expression?
- 30:49:11 What is the value of this inside an arrow function defined in a non-arrow function?
- 31:22:11 What is a type guard?
- 33:03:11 What is the order of execution in JavaScript?
- 35:11:01 Which version of ecmascript was scrapped?
- 39:41:00 What is the result of the following comparison in JavaScript?
- 41:37:21 What were the major criticisms of CSS in it’s early days?
- 46:48:10 SIIIIICK ××× PIIIICKS ×××
××× SIIIIICK ××× PIIIICKS ×××
Shameless Plugs
Tweet us your tasty treats