title
TypeScript Tutorial

description
Code & Transcript : https://goo.gl/GDuzMc Best TypeScript Book : http://amzn.to/2d6ZjmM Support me on Patreon : https://www.patreon.com/derekbanas 00:30 Install 03:07 Data Types 04:53 Writing to Browser 07:47 Conversion 09:16 Interfaces Pt 1 10:43 Arrays 13:10 Math 16:28 Let 18:31 Looping 20:10 Functions 26:36 Classes 31:13 Getters & Setters 33:44 Inheritance 36:10 Interfaces Pt 2 39:08 Generic Functions 41:53 Generic Classes 45:10 Destructoring 46:49 Template Strings 47:37 Spread Operator In this tutorial we'll explore everything you'd learn in a standard 200 page book on TypeScript. I'll cover installation, data types, changing the browser, arrays, math, looping, functions, classes, interfaces, inheritance, generic functions, generic classes, destructoring, template strings, spread operator, and many other topics. Thank you to Patreon supports like the following for helping me make this video https://www.facebook.com/cottageindustriesbuild/ @kyleaisho @thetwistedhat vjFaLk

detail
{'title': 'TypeScript Tutorial', 'heatmap': [{'end': 149.418, 'start': 117.238, 'weight': 0.706}, {'end': 1484.808, 'start': 1420.247, 'weight': 0.882}, {'end': 1726.967, 'start': 1684.318, 'weight': 0.73}, {'end': 1781.49, 'start': 1741.905, 'weight': 0.721}, {'end': 1925.922, 'start': 1893.645, 'weight': 0.728}, {'end': 2400.19, 'start': 2338.636, 'weight': 1}], 'summary': "The 'typescript tutorial' covers fundamental concepts, data types, arrays, basics, functions, oop, class creation, inheritance, object instantiation, interface functions, and typescript overview, with practical demonstrations and examples, showcasing the implementation of typescript features such as type system, interfaces, arrays, functions, arrow functions, object-oriented programming, classes, inheritance, and interfaces for vehicle contracts.", 'chapters': [{'end': 550.598, 'segs': [{'end': 61.329, 'src': 'embed', 'start': 0.148, 'weight': 0, 'content': [{'end': 2.729, 'text': 'Well hello Internet and welcome to my TypeScript tutorial.', 'start': 0.148, 'duration': 2.581}, {'end': 8.33, 'text': "In this one tutorial you're going to learn the core syntax of TypeScript all in one video.", 'start': 2.769, 'duration': 5.561}, {'end': 16.831, 'text': "And basically TypeScript's just going to bring a type system as well as future capabilities of JavaScript to you today.", 'start': 8.61, 'duration': 8.221}, {'end': 22.332, 'text': "And anything you can do in JavaScript you can put directly inside of TypeScript and it's just going to work.", 'start': 17.111, 'duration': 5.221}, {'end': 27.574, 'text': "So what I'm going to really focus in on here is what makes TypeScript different from JavaScript.", 'start': 22.593, 'duration': 4.981}, {'end': 29.714, 'text': "So I have a lot to do, so let's get into it.", 'start': 27.914, 'duration': 1.8}, {'end': 36.028, 'text': "Now the very first thing you're going to need to do is you're going to have to compile TypeScript into JavaScript.", 'start': 30.643, 'duration': 5.385}, {'end': 38.61, 'text': "So you're going to need a compiler.", 'start': 36.088, 'duration': 2.522}, {'end': 41.873, 'text': "So what you're going to want to do, no matter what operating system you're on?", 'start': 38.791, 'duration': 3.082}, {'end': 46.558, 'text': "you're going to want to go to nodejs.org and you're going to click on download.", 'start': 41.873, 'duration': 4.685}, {'end': 50.001, 'text': 'I would just go with this one right here, recommended for most users.', 'start': 46.638, 'duration': 3.363}, {'end': 55.306, 'text': 'So just click on that guy and click next a whole bunch of times until that is installed on your system.', 'start': 50.021, 'duration': 5.285}, {'end': 61.329, 'text': "then what you're going to want to do is open up your terminal if you're on osx or linux, or your command prompt.", 'start': 55.606, 'duration': 5.723}], 'summary': 'Typescript tutorial covering core syntax and compilation to javascript. emphasizes differences from javascript.', 'duration': 61.181, 'max_score': 0.148, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU148.jpg'}, {'end': 149.418, 'src': 'heatmap', 'start': 89.661, 'weight': 3, 'content': [{'end': 94.223, 'text': "Now it's time for us to install TypeScript, and this is the same on every operating system.", 'start': 89.661, 'duration': 4.562}, {'end': 103.027, 'text': "You're going to type in npm install-g typescript, and if you can't tell, I'm a little bit sick today, so that's why I sound weird,", 'start': 94.263, 'duration': 8.764}, {'end': 104.027, 'text': 'so I apologize for that.', 'start': 103.027, 'duration': 1}, {'end': 108.569, 'text': 'And you do this on every operating system, and you will have TypeScript installed.', 'start': 104.487, 'duration': 4.082}, {'end': 117.238, 'text': "Now, if you want to be able to compile from TypeScript to JavaScript, what you're going to do is type in tsc,", 'start': 108.909, 'duration': 8.329}, {'end': 121.222, 'text': "and you're going to do this in the directory where you're going to be saving your TypeScript files.", 'start': 117.238, 'duration': 3.984}, {'end': 123.845, 'text': "So let's say you have a TypeScript file called tut.", 'start': 121.462, 'duration': 2.383}, {'end': 131.71, 'text': "And for this tutorial I'm going to target ECMAScript 5 because this has compatibility.", 'start': 126.167, 'duration': 5.543}, {'end': 135.972, 'text': "Everything I'm going to do here is going to be compatible with all browsers.", 'start': 131.89, 'duration': 4.082}, {'end': 140.254, 'text': "So you're just going to type in ES5, exactly like that.", 'start': 136.272, 'duration': 3.982}, {'end': 143.635, 'text': 'And whenever you do that, that is going to compile all of your different scripts.', 'start': 140.494, 'duration': 3.141}, {'end': 149.418, 'text': 'And on OSX and on Linux to automatically compile every single time I change a file.', 'start': 143.895, 'duration': 5.523}], 'summary': 'Install typescript using `npm install -g typescript` on all operating systems.', 'duration': 42.049, 'max_score': 89.661, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU89661.jpg'}, {'end': 243.358, 'src': 'embed', 'start': 212.063, 'weight': 5, 'content': [{'end': 214.864, 'text': "it's going to automatically figure out what the type is.", 'start': 212.063, 'duration': 2.801}, {'end': 227.871, 'text': "However, if you'd like to come in here and define the type for your variables because that's one good thing about TypeScript just going to go var my name and then you're going to follow that up with string,", 'start': 215.245, 'duration': 12.626}, {'end': 234.114, 'text': "for example, and then you're going to type in something inside of here, like this, and then put a semicolon.", 'start': 227.871, 'duration': 6.243}, {'end': 243.358, 'text': "likewise, if you want to go and use a number, just like you would with JavaScript, you're going to type number and 41, for example,", 'start': 234.114, 'duration': 9.244}], 'summary': "Typescript allows for defining variable types, e.g. 'myname: string' or 'number: 41'.", 'duration': 31.295, 'max_score': 212.063, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU212063.jpg'}, {'end': 490.219, 'src': 'embed', 'start': 456.784, 'weight': 6, 'content': [{'end': 462.967, 'text': "Again, it's going to change the data type for this since it's an any depending upon whatever data you have in here.", 'start': 456.784, 'duration': 6.183}, {'end': 466.469, 'text': 'The last thing you assigned is a number, so it is a number.', 'start': 463.027, 'duration': 3.442}, {'end': 471.392, 'text': "There's a couple different ways to convert strings into numbers and numbers into strings.", 'start': 466.529, 'duration': 4.863}, {'end': 475.394, 'text': "I'm going to show you all of them as the tutorial continues, but I'll just show you one here.", 'start': 471.492, 'duration': 3.902}, {'end': 490.219, 'text': "string to num and let's have this be a number type and I can say parse int like that and throw a string inside of there and that's going to convert that string into a number.", 'start': 475.834, 'duration': 14.385}], 'summary': 'Converting data types: using parse int to convert string to number.', 'duration': 33.435, 'max_score': 456.784, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU456784.jpg'}], 'start': 0.148, 'title': 'Typescript fundamentals and setup', 'summary': 'Provides an overview of typescript, emphasizing its capability to bring a type system and future javascript features, and covers setting up node.js and typescript, including installing node.js, checking npm installation, installing typescript, compiling typescript to javascript, and handling variables in typescript.', 'chapters': [{'end': 41.873, 'start': 0.148, 'title': 'Typescript tutorial overview', 'summary': 'Provides an overview of typescript, highlighting its core syntax and the process of compiling typescript into javascript, emphasizing its capability to bring a type system and future javascript features, while allowing seamless integration of javascript code into typescript.', 'duration': 41.725, 'highlights': ['TypeScript brings a type system and future capabilities of JavaScript, allowing seamless integration of JavaScript code into TypeScript.', 'The tutorial focuses on the core syntax of TypeScript and the process of compiling TypeScript into JavaScript.', 'The chapter emphasizes the importance of having a compiler when working with TypeScript.']}, {'end': 550.598, 'start': 41.873, 'title': 'Setting up node.js and typescript', 'summary': 'Covers setting up node.js and typescript, including installing node.js, checking npm installation, installing typescript, compiling typescript to javascript, and handling variables in typescript.', 'duration': 508.725, 'highlights': ['Installing Node.js The speaker guides the audience to go to nodejs.org, click on download, and install Node.js, recommended for most users.', 'Installing TypeScript The process of installing TypeScript is explained, which involves using npm to install it on every operating system.', "Compiling TypeScript to JavaScript The speaker demonstrates how to compile TypeScript to JavaScript using 'tsc' command and targeting ECMAScript 5 for compatibility with all browsers.", 'Handling Variables in TypeScript The tutorial covers the TypeScript way of handling variables, including declaring statically typed variables, creating booleans, marking variables as any type, and handling null and undefined values.', "Converting Data Types The tutorial shows how to convert strings into numbers using 'parseInt' and numbers into strings using the 'toString' function."]}], 'duration': 550.45, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU148.jpg', 'highlights': ['TypeScript brings a type system and future capabilities of JavaScript, allowing seamless integration of JavaScript code into TypeScript.', 'The tutorial focuses on the core syntax of TypeScript and the process of compiling TypeScript into JavaScript.', 'The chapter emphasizes the importance of having a compiler when working with TypeScript.', 'Installing TypeScript involves using npm to install it on every operating system.', "Compiling TypeScript to JavaScript using 'tsc' command and targeting ECMAScript 5 for compatibility with all browsers.", 'Handling Variables in TypeScript covers declaring statically typed variables, creating booleans, marking variables as any type, and handling null and undefined values.', "Converting Data Types demonstrates how to convert strings into numbers using 'parseInt' and numbers into strings using the 'toString' function.", 'Installing Node.js is recommended for most users.']}, {'end': 780.923, 'segs': [{'end': 594.678, 'src': 'embed', 'start': 571.22, 'weight': 0, 'content': [{'end': 577.906, 'text': "So how you do that is you go interface, and you could say superhero would be a complex data type I'd like to create.", 'start': 571.22, 'duration': 6.686}, {'end': 582.71, 'text': "And let's say that, well, I'm going to define what data type it is.", 'start': 578.406, 'duration': 4.304}, {'end': 587.795, 'text': "It's going to contain the real name as well as the super name for our superheroes.", 'start': 582.77, 'duration': 5.025}, {'end': 588.776, 'text': 'There that is.', 'start': 588.135, 'duration': 0.641}, {'end': 591.675, 'text': 'and make sure you put semicolons here at the end.', 'start': 589.352, 'duration': 2.323}, {'end': 594.678, 'text': "Alright, so there's a complex type that we can work with.", 'start': 591.695, 'duration': 2.983}], 'summary': "Creating a complex data type 'superhero' with real and super name. utilizing interface.", 'duration': 23.458, 'max_score': 571.22, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU571220.jpg'}, {'end': 672.5, 'src': 'embed', 'start': 644.841, 'weight': 4, 'content': [{'end': 648.525, 'text': "let's say we want to create an array of strings.", 'start': 644.841, 'duration': 3.684}, {'end': 649.446, 'text': 'how would we do that?', 'start': 648.525, 'duration': 0.921}, {'end': 659.195, 'text': "well, we'll just go var, employees and string, and then you would just assign the different string values you want assigned to your array.", 'start': 649.446, 'duration': 9.749}, {'end': 664.137, 'text': "So let's say we want Bob and Sally and Sam.", 'start': 659.435, 'duration': 4.702}, {'end': 665.518, 'text': 'We just do it like that.', 'start': 664.337, 'duration': 1.181}, {'end': 672.5, 'text': 'Now if you would try to then push on a value that was not a string onto the array.', 'start': 665.838, 'duration': 6.662}], 'summary': "Creating an array of strings by assigning values. example: var employees = ['bob', 'sally', 'sam'].", 'duration': 27.659, 'max_score': 644.841, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU644841.jpg'}, {'end': 754.804, 'src': 'embed', 'start': 711.487, 'weight': 3, 'content': [{'end': 717.109, 'text': 'you could also go and store your special interface types that you created inside an array.', 'start': 711.487, 'duration': 5.622}, {'end': 718.83, 'text': 'You can store anything inside an array.', 'start': 717.129, 'duration': 1.701}, {'end': 722.452, 'text': 'Like I said, anything you can do with JavaScript, you can do with TypeScript.', 'start': 718.85, 'duration': 3.602}, {'end': 731.697, 'text': "So let's say that I wanted to throw in superheroes, and this guy specifically is going to be superhero array type.", 'start': 722.652, 'duration': 9.045}, {'end': 749.959, 'text': 'I could then easily push on a new superhero with push and then define all the different things that I want to throw inside of here Bruce Wayne and the super name property also and in this situation we would put Batman inside of there and likewise,', 'start': 732.017, 'duration': 17.942}, {'end': 754.804, 'text': 'if I would want to print out the information that is on there or inside of there.', 'start': 749.959, 'duration': 4.845}], 'summary': 'Javascript and typescript enable storing various types of data in arrays, such as superheroes like batman, allowing for versatile data manipulation.', 'duration': 43.317, 'max_score': 711.487, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU711487.jpg'}], 'start': 550.598, 'title': 'Typescript data types and arrays', 'summary': 'Covers creating complex data types using interfaces, creating and manipulating arrays of strings in typescript, and storing and accessing data in typescript arrays. it demonstrates defining interfaces for superhero data type, creating arrays of strings with type constraints, and storing and accessing various data types in arrays.', 'chapters': [{'end': 644.841, 'start': 550.598, 'title': 'Interfaces and complex data types', 'summary': 'Discusses creating complex data types using interfaces and demonstrates the use of interfaces to define a superhero data type with real name and super name attributes, along with their usage and retrieval.', 'duration': 94.243, 'highlights': ['The chapter discusses creating complex data types using interfaces and demonstrates the use of interfaces to define a superhero data type with real name and super name attributes, along with their usage and retrieval.', 'The process of creating a complex data type using interfaces is illustrated, with an example of defining a superhero data type containing real name and super name attributes.', "Demonstration of defining a complex data type 'superhero' using interfaces, followed by an example of defining and accessing attributes like real name and super name."]}, {'end': 711.487, 'start': 644.841, 'title': 'Creating array of strings in typescript', 'summary': 'Explains how to create an array of strings in typescript, emphasizing the need for all elements to be strings and highlighting the error triggered when attempting to push a non-string value into the array.', 'duration': 66.646, 'highlights': ['The need to ensure that all elements in the array are strings to avoid errors when pushing non-string values, as demonstrated by the error triggered when attempting to push a numeric value.', 'Demonstration of creating an array of strings and printing the elements to the console using TypeScript.']}, {'end': 780.923, 'start': 711.487, 'title': 'Storing and accessing data in typescript arrays', 'summary': 'Discusses storing and accessing different types of data, including superheroes, in typescript arrays, demonstrating how to define arrays, add elements, and access specific properties.', 'duration': 69.436, 'highlights': ['You can store anything inside an array in TypeScript, allowing for flexible data storage and retrieval.', 'The example demonstrates adding a superhero to an array using the push method and accessing specific properties of the superhero using array indexes.', "The chapter emphasizes the flexibility and similarity between JavaScript and TypeScript, highlighting TypeScript's capability to handle diverse data types."]}], 'duration': 230.325, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU550598.jpg', 'highlights': ['The chapter discusses creating complex data types using interfaces and demonstrates the use of interfaces to define a superhero data type with real name and super name attributes, along with their usage and retrieval.', "Demonstration of defining a complex data type 'superhero' using interfaces, followed by an example of defining and accessing attributes like real name and super name.", 'The process of creating a complex data type using interfaces is illustrated, with an example of defining a superhero data type containing real name and super name attributes.', 'Demonstration of creating an array of strings and printing the elements to the console using TypeScript.', 'The need to ensure that all elements in the array are strings to avoid errors when pushing non-string values, as demonstrated by the error triggered when attempting to push a numeric value.', 'You can store anything inside an array in TypeScript, allowing for flexible data storage and retrieval.', 'The example demonstrates adding a superhero to an array using the push method and accessing specific properties of the superhero using array indexes.', "The chapter emphasizes the flexibility and similarity between JavaScript and TypeScript, highlighting TypeScript's capability to handle diverse data types."]}, {'end': 1195.596, 'segs': [{'end': 811.635, 'src': 'embed', 'start': 780.923, 'weight': 0, 'content': [{'end': 781.764, 'text': 'that that worked.', 'start': 780.923, 'duration': 0.841}, {'end': 789.967, 'text': 'so, like i said, quick run through of arrays and how we can work with them inside of typescript and everything else we do in javascript is the same.', 'start': 781.764, 'duration': 8.203}, {'end': 793.529, 'text': "now let's go take a real brief look at how we can do some things with math.", 'start': 789.967, 'duration': 3.562}, {'end': 797.35, 'text': 'Alright. so just a couple little things here.', 'start': 794.289, 'duration': 3.061}, {'end': 807.214, 'text': "If we want to go, do a document write and let's say we want to have 5 plus 4 is equal to if we want to go and put a math function inside of here.", 'start': 797.37, 'duration': 9.844}, {'end': 811.635, 'text': 'you would go and put your parentheses like that and you could go 5 plus 4..', 'start': 807.214, 'duration': 4.421}], 'summary': 'Quick overview of working with arrays and math functions in typescript and javascript.', 'duration': 30.712, 'max_score': 780.923, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU780923.jpg'}, {'end': 1004.199, 'src': 'embed', 'start': 974.486, 'weight': 1, 'content': [{'end': 976.687, 'text': "After it's done, then it's going to decrement it.", 'start': 974.486, 'duration': 2.201}, {'end': 981.53, 'text': "Down here, it's going to decrement it first and then print out the new value.", 'start': 976.967, 'duration': 4.563}, {'end': 985.212, 'text': "And that's the reason why you see the odd incrementing and decrementing there.", 'start': 981.71, 'duration': 3.502}, {'end': 987.293, 'text': 'So hopefully I have cleared that up.', 'start': 985.492, 'duration': 1.801}, {'end': 991.396, 'text': "And now let's jump over and take a look at some conditional statements.", 'start': 987.614, 'duration': 3.782}, {'end': 1004.199, 'text': 'Now if and switch and the ternary operator are going to operate exactly the same way inside of TypeScript as they do with JavaScript.', 'start': 991.696, 'duration': 12.503}], 'summary': 'The odd incrementing and decrementing behavior is explained, and conditional statements in typescript operate the same as in javascript.', 'duration': 29.713, 'max_score': 974.486, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU974486.jpg'}, {'end': 1131.1, 'src': 'embed', 'start': 1080.911, 'weight': 2, 'content': [{'end': 1091.217, 'text': 'if you use var inside of a block statement, whenever you change the value of it, that it is going to change the value outside of the block statement.', 'start': 1080.911, 'duration': 10.306}, {'end': 1099.382, 'text': 'If, however, you use let and you change the value inside here using let, it will not change the value for that variable.', 'start': 1091.517, 'duration': 7.865}, {'end': 1108.022, 'text': "So that's the major difference between the different conditional statements inside of TypeScript versus inside of JavaScript.", 'start': 1100.016, 'duration': 8.006}, {'end': 1110.604, 'text': "And now let's take a look at looping.", 'start': 1108.223, 'duration': 2.381}, {'end': 1116.529, 'text': 'So looping also is going to work the same in TypeScript as it does in JavaScript.', 'start': 1111.585, 'duration': 4.944}, {'end': 1121.413, 'text': "However, there is another operator called for of, and I'll show you why it's useful.", 'start': 1116.569, 'duration': 4.844}, {'end': 1122.854, 'text': "So it's very common.", 'start': 1121.753, 'duration': 1.101}, {'end': 1131.1, 'text': "Let's go and create ourselves a random array, which is going to have the values of 5, 6, 7, and 8.", 'start': 1122.874, 'duration': 8.226}], 'summary': "Using 'let' in typescript blocks won't change variable values outside, 'for of' loop is useful.", 'duration': 50.189, 'max_score': 1080.911, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1080911.jpg'}], 'start': 780.923, 'title': 'Typescript basics', 'summary': 'Covers working with arrays and math, let vs var operators, and the for of operator in typescript. it includes examples of arithmetic operations, string concatenation, and increment and decrement operators. additionally, it explains the behavior of let and var operators and introduces the for of operator.', 'chapters': [{'end': 991.396, 'start': 780.923, 'title': 'Working with arrays and math in typescript', 'summary': 'Covers working with arrays and math in typescript, including examples of addition, subtraction, multiplication, division, modulus, and handling string concatenation, as well as clarifying the behavior of increment and decrement operators, and a brief introduction to conditional statements.', 'duration': 210.473, 'highlights': ['The chapter covers working with arrays and math in TypeScript, including examples of addition, subtraction, multiplication, division, modulus, and handling string concatenation. The chapter provides examples of performing arithmetic operations such as addition, subtraction, multiplication, division, and modulus, alongside demonstrating how adding a number to a string results in the entire expression being considered a string.', 'Clarification of the behavior of increment and decrement operators, including the distinction between placing them at the beginning and at the end of a variable. The chapter clarifies the behavior of increment and decrement operators, illustrating the difference between placing them at the beginning and at the end of a variable, and also explains the order of execution and the resulting values.', 'Brief introduction to conditional statements. The chapter briefly introduces conditional statements, setting the stage for further exploration of this topic in TypeScript.']}, {'end': 1195.596, 'start': 991.696, 'title': 'Typescript: let vs var and for of operator', 'summary': "Explains the difference between let and var operators in typescript, demonstrating that variables defined with let inside blocks don't change the value of variables outside the blocks. it also introduces the for of operator and its usefulness in typescript.", 'duration': 203.9, 'highlights': ["Variables defined with let inside blocks don't change the value of variables outside the blocks. The chapter demonstrates that using let inside blocks in TypeScript does not change the value of variables outside the blocks.", 'Difference between let and var in TypeScript. The chapter explains the difference between let and var operators, showing that var inside a block statement changes the value outside the block, while let does not.', 'Introduction of for of operator in TypeScript. The for of operator is introduced and its usefulness in TypeScript is explained, particularly in converting a number array into a string array using the map function.']}], 'duration': 414.673, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU780923.jpg', 'highlights': ['The chapter covers working with arrays and math in TypeScript, including examples of addition, subtraction, multiplication, division, modulus, and handling string concatenation.', 'Clarification of the behavior of increment and decrement operators, including the distinction between placing them at the beginning and at the end of a variable.', "Variables defined with let inside blocks don't change the value of variables outside the blocks.", 'Difference between let and var in TypeScript.', 'Introduction of for of operator in TypeScript.']}, {'end': 1597.183, 'segs': [{'end': 1233.053, 'src': 'embed', 'start': 1195.596, 'weight': 0, 'content': [{'end': 1203.302, 'text': "so we'll say value and the break statement and run it, and you're going to see, instead of printing out the indexes in this situation,", 'start': 1195.596, 'duration': 7.706}, {'end': 1205.884, 'text': 'they actually print the real values.', 'start': 1203.302, 'duration': 2.582}, {'end': 1209.946, 'text': 'so there is for of and something useful that TypeScript can do.', 'start': 1205.884, 'duration': 4.062}, {'end': 1213.269, 'text': "so now let's go and take a pretty deep look at functions.", 'start': 1209.946, 'duration': 3.323}, {'end': 1223.228, 'text': "Now, with functions, you're going to be able to assign the variables types for the attributes as well as the return types after the attributes,", 'start': 1214.264, 'duration': 8.964}, {'end': 1224.389, 'text': 'which might be a little bit weird.', 'start': 1223.228, 'duration': 1.161}, {'end': 1228.811, 'text': "And if you don't have anything returning from a function you would put void inside of there.", 'start': 1224.789, 'duration': 4.022}, {'end': 1230.212, 'text': "So I'm going to show you a whole bunch.", 'start': 1228.851, 'duration': 1.361}, {'end': 1233.053, 'text': "So let's go and create something called getSum.", 'start': 1230.252, 'duration': 2.801}], 'summary': "Transcript covers using 'for of' loop, typescript functions, and 'void' type.", 'duration': 37.457, 'max_score': 1195.596, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1195596.jpg'}, {'end': 1484.808, 'src': 'heatmap', 'start': 1405.652, 'weight': 2, 'content': [{'end': 1409.334, 'text': 'because the default value of 2 is going to be used in that situation.', 'start': 1405.652, 'duration': 3.682}, {'end': 1420.247, 'text': "Otherwise we'll be able to come in here and we'll be able to go 5 minus 2, minus 3 is equal to, and once again we will call getDifference,", 'start': 1409.714, 'duration': 10.533}, {'end': 1424.652, 'text': "and in this situation we'll pass a5, a2, and a3 inside of there.", 'start': 1420.247, 'duration': 4.405}, {'end': 1428.657, 'text': 'Save it, reload it, and there you can see that it works out perfectly fine.', 'start': 1425.012, 'duration': 3.645}, {'end': 1437.479, 'text': 'Another thing that is very, very useful is that we will be able to come in here and receive an unknown number of values,', 'start': 1428.937, 'duration': 8.542}, {'end': 1440.8, 'text': "and we'll be using what's called the rest parameter to do that.", 'start': 1437.479, 'duration': 3.321}, {'end': 1452.142, 'text': 'So we could do something like sum all, and here is our function, and the rest parameter is going to look like dot, dot, dot and nums like this,', 'start': 1441.06, 'duration': 11.082}, {'end': 1454.843, 'text': 'and then we define that it is a number array.', 'start': 1452.142, 'duration': 2.701}, {'end': 1459.287, 'text': 'and, like I said previously, if there is nothing returned from a function,', 'start': 1455.285, 'duration': 4.002}, {'end': 1472.475, 'text': "we type void inside of there and here what I'm going to use is reduce with our array to add all the values together and to do that we go sum is equal to nums reduce,", 'start': 1459.287, 'duration': 13.188}, {'end': 1476.297, 'text': 'and this is going to receive an a and b value.', 'start': 1472.475, 'duration': 3.822}, {'end': 1484.808, 'text': "use our fat arrow here, a plus b and the default value that we're going to start off with when we're summing these.", 'start': 1476.297, 'duration': 8.511}], 'summary': 'Demonstrates using default values, rest parameters, and reduce method in javascript functions.', 'duration': 70.645, 'max_score': 1405.652, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1405652.jpg'}, {'end': 1562.838, 'src': 'embed', 'start': 1537.56, 'weight': 5, 'content': [{'end': 1542.945, 'text': "we can call and pass in a whole bunch of different values and, like I said, it doesn't know how many.", 'start': 1537.56, 'duration': 5.385}, {'end': 1546.027, 'text': "It's just going to store them all in the number array, and if we run it,", 'start': 1543.145, 'duration': 2.882}, {'end': 1550.453, 'text': "You're going to see that it was automatically able to come in there and sum all those values for us.", 'start': 1546.271, 'duration': 4.182}, {'end': 1558.196, 'text': 'And the final thing I want to talk about is the arrow functions that are available for you inside of TypeScript.', 'start': 1551.373, 'duration': 6.823}, {'end': 1562.838, 'text': "And basically arrow functions don't include function inside of the definition.", 'start': 1558.356, 'duration': 4.482}], 'summary': 'Typescript allows storing and summing a variety of values using arrow functions.', 'duration': 25.278, 'max_score': 1537.56, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1537560.jpg'}], 'start': 1195.596, 'title': 'Typescript functions and arrow functions', 'summary': "Introduces typescript's for of loop, function declaration with variable types and return types, default values, and optional attributes, demonstrating their usage through examples and output. it also covers the usage of rest parameters to handle an unknown number of values in a function, utilizing reduce method for summing all values in an array, and the functionality of arrow functions in typescript, highlighting their benefits and usage.", 'chapters': [{'end': 1428.657, 'start': 1195.596, 'title': 'Typescript functions', 'summary': "Introduces typescript's for of loop, function declaration with variable types and return types, default values, and optional attributes, demonstrating their usage through examples and output.", 'duration': 233.061, 'highlights': ["TypeScript's for of loop prints real values instead of indexes. The for of loop in TypeScript prints real values instead of indexes.", 'Functions in TypeScript can have assigned variable types and return types, including void if nothing is returned. Functions in TypeScript can have assigned variable types and return types, including void if nothing is returned.', "Function 'getSum' demonstrates assigning variable types and return type in TypeScript. The function 'getSum' is created to demonstrate assigning variable types and return type in TypeScript.", "Function 'getDifference' showcases default values and optional attributes in TypeScript. The function 'getDifference' showcases how to use default values and optional attributes in TypeScript."]}, {'end': 1597.183, 'start': 1428.937, 'title': 'Typescript functions and arrow functions', 'summary': 'Covers the usage of rest parameters to handle an unknown number of values in a function, utilizing reduce method for summing all values in an array, and the functionality of arrow functions in typescript, highlighting their benefits and usage.', 'duration': 168.246, 'highlights': ['Utilizing the rest parameter to handle an unknown number of values in a function The chapter explains using the rest parameter to receive an unknown number of values in a function, enabling flexibility in handling variable input.', 'Using the reduce method to sum all values in an array The tutorial demonstrates the use of the reduce method to add all the values together in an array, showcasing the practical application of this method for summing array elements.', 'Explaining the functionality and benefits of arrow functions in TypeScript The chapter discusses the benefits and usage of arrow functions in TypeScript, highlighting their concise syntax and demonstrating their application in adding one to a given value.']}], 'duration': 401.587, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1195596.jpg', 'highlights': ["TypeScript's for of loop prints real values instead of indexes.", 'Functions in TypeScript can have assigned variable types and return types, including void if nothing is returned.', 'Utilizing the rest parameter to handle an unknown number of values in a function', 'Using the reduce method to sum all values in an array', "Function 'getDifference' showcases default values and optional attributes in TypeScript", 'Explaining the functionality and benefits of arrow functions in TypeScript', "Function 'getSum' demonstrates assigning variable types and return type in TypeScript"]}, {'end': 1825.103, 'segs': [{'end': 1626.241, 'src': 'embed', 'start': 1598.16, 'weight': 0, 'content': [{'end': 1603.985, 'text': 'OK, so classes are going to describe real world objects by defining their attributes.', 'start': 1598.16, 'duration': 5.825}, {'end': 1612.112, 'text': 'In this situation, attributes are known as fields, and those real world objects capabilities, which are known as methods.', 'start': 1604.345, 'duration': 7.767}, {'end': 1617.297, 'text': "So let's say I wanted to come in here and I wanted to define an animal class.", 'start': 1612.553, 'duration': 4.744}, {'end': 1621.479, 'text': "that I'm going to use to model real-world animal objects.", 'start': 1617.797, 'duration': 3.682}, {'end': 1626.241, 'text': 'Well, inside of here, I would be able to define class fields.', 'start': 1621.919, 'duration': 4.322}], 'summary': 'Classes define real world objects with attributes and methods.', 'duration': 28.081, 'max_score': 1598.16, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1598160.jpg'}, {'end': 1726.967, 'src': 'heatmap', 'start': 1645.264, 'weight': 1, 'content': [{'end': 1652.991, 'text': 'And by saying static fields, this means that the value of this field inside of here is going to be shared by every object.', 'start': 1645.264, 'duration': 7.727}, {'end': 1658.716, 'text': "So let's say that I wanted to keep track of every time I created a new animal type.", 'start': 1653.211, 'duration': 5.505}, {'end': 1660.057, 'text': 'I could do so.', 'start': 1659.317, 'duration': 0.74}, {'end': 1664.501, 'text': "And I'm going to start off with 0 because I haven't created an animal type yet.", 'start': 1660.678, 'duration': 3.823}, {'end': 1674.79, 'text': "And very often also static fields inside of classes are going to be attributes that don't make sense for the animal to have,", 'start': 1664.901, 'duration': 9.889}, {'end': 1677.933, 'text': 'but they are something still that we would like to keep track of.', 'start': 1674.79, 'duration': 3.143}, {'end': 1684.137, 'text': "So animals normally aren't able to count, so in this situation we are going to make that static.", 'start': 1678.133, 'duration': 6.004}, {'end': 1691.263, 'text': 'But, like I said, this is going to be a value that is going to be shared between every single animal object that is ever created,', 'start': 1684.318, 'duration': 6.945}, {'end': 1692.744, 'text': "and that's what static means.", 'start': 1691.263, 'duration': 1.481}, {'end': 1703.893, 'text': 'And if you want to initialize or set certain values every time a new object is created, you use a function that is called a constructor,', 'start': 1693.465, 'duration': 10.428}, {'end': 1709.256, 'text': 'and something neat about typescript is if you mark an attribute as private,', 'start': 1703.893, 'duration': 5.363}, {'end': 1714.499, 'text': 'the value is automatically going to be assigned to a variable and the variable is going to be created in everything.', 'start': 1709.256, 'duration': 5.243}, {'end': 1726.967, 'text': "so let's say that all of our animals are going to be given a name value and also that we would like a owner to be assigned to every single animal that we ever create.", 'start': 1714.499, 'duration': 12.468}], 'summary': 'Static fields are shared among all objects; constructors initialize values. private attributes create variables for each object.', 'duration': 63.992, 'max_score': 1645.264, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1645264.jpg'}, {'end': 1781.49, 'src': 'heatmap', 'start': 1741.905, 'weight': 0.721, 'content': [{'end': 1748.449, 'text': 'So anytime you want to call for a static class field you have to proceed it with whatever the class name is.', 'start': 1741.905, 'duration': 6.544}, {'end': 1751.771, 'text': "Alright so let's keep adding to the capabilities of this.", 'start': 1748.469, 'duration': 3.302}, {'end': 1759.957, 'text': "Now you're going to be able to find methods or capabilities for your animal objects using private, but if you do so,", 'start': 1752.171, 'duration': 7.786}, {'end': 1763.239, 'text': 'you are not going to be able to see them in any subclasses.', 'start': 1759.957, 'duration': 3.282}, {'end': 1768.042, 'text': 'or classes that are created from the animal type in this situation.', 'start': 1763.579, 'duration': 4.463}, {'end': 1769.403, 'text': 'More on that in a second.', 'start': 1768.422, 'duration': 0.981}, {'end': 1770.724, 'text': "I'll actually show you how to do that.", 'start': 1769.423, 'duration': 1.301}, {'end': 1775.426, 'text': "So what I'm going to do is I'm going to steer clear of using private in this situation.", 'start': 1771.064, 'duration': 4.362}, {'end': 1781.49, 'text': "And let's say that I wanted to create a function here that's going to provide me some owner information.", 'start': 1775.727, 'duration': 5.763}], 'summary': 'Demonstrating usage of static class fields and private methods for animal objects.', 'duration': 39.585, 'max_score': 1741.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1741905.jpg'}, {'end': 1775.426, 'src': 'embed', 'start': 1752.171, 'weight': 4, 'content': [{'end': 1759.957, 'text': "Now you're going to be able to find methods or capabilities for your animal objects using private, but if you do so,", 'start': 1752.171, 'duration': 7.786}, {'end': 1763.239, 'text': 'you are not going to be able to see them in any subclasses.', 'start': 1759.957, 'duration': 3.282}, {'end': 1768.042, 'text': 'or classes that are created from the animal type in this situation.', 'start': 1763.579, 'duration': 4.463}, {'end': 1769.403, 'text': 'More on that in a second.', 'start': 1768.422, 'duration': 0.981}, {'end': 1770.724, 'text': "I'll actually show you how to do that.", 'start': 1769.423, 'duration': 1.301}, {'end': 1775.426, 'text': "So what I'm going to do is I'm going to steer clear of using private in this situation.", 'start': 1771.064, 'duration': 4.362}], 'summary': 'Private methods not visible in subclasses or classes created from type.', 'duration': 23.255, 'max_score': 1752.171, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1752171.jpg'}], 'start': 1598.16, 'title': 'Object-oriented programming', 'summary': 'Explains how classes define real world objects using attributes and methods, including the concept of public and static fields, with an example of creating an animal class and defining its attributes and static fields. it also discusses the use of static fields and methods in typescript, including the concept of static fields shared between all instances of a class, the use of constructors to initialize values for new objects, and the impact of using private attributes on subclass visibility.', 'chapters': [{'end': 1684.137, 'start': 1598.16, 'title': 'Classes and attributes in object-oriented programming', 'summary': 'Explains how classes define real world objects using attributes and methods, including the concept of public and static fields, with an example of creating an animal class and defining its attributes and static fields.', 'duration': 85.977, 'highlights': ['The chapter explains how classes define real world objects using attributes and methods, with an example of creating an animal class and defining its attributes and static fields.', 'It introduces the concept of public and static fields, where public fields allow easy value modification and static fields are shared by every object, with a practical example of keeping track of created animal types.', "Static fields inside of classes are attributes that don't make sense for the animal to have, but are still useful to keep track of, exemplified by the concept of counting, which would not make sense for animals."]}, {'end': 1825.103, 'start': 1684.318, 'title': 'Static fields and methods in typescript', 'summary': 'Discusses the use of static fields and methods in typescript, including the concept of static fields shared between all instances of a class, the use of constructors to initialize values for new objects, and the impact of using private attributes on subclass visibility.', 'duration': 140.785, 'highlights': ["The concept of static fields shared between all instances of a class is explained. Static fields are values shared between all instances of a class, and they are defined using the 'static' keyword.", 'The use of constructors to initialize values for new objects is discussed. Constructors are used to set values for new objects, and they are called automatically when a new object is created.', 'The impact of using private attributes on subclass visibility is highlighted. Private attributes restrict visibility in subclasses, and using private attributes limits their access in subclasses or classes created from the original class.']}], 'duration': 226.943, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1598160.jpg', 'highlights': ['The chapter explains how classes define real world objects using attributes and methods, with an example of creating an animal class and defining its attributes and static fields.', 'The concept of public and static fields is introduced, where public fields allow easy value modification and static fields are shared by every object, with a practical example of keeping track of created animal types.', "The concept of static fields shared between all instances of a class is explained. Static fields are values shared between all instances of a class, and they are defined using the 'static' keyword.", 'The use of constructors to initialize values for new objects is discussed. Constructors are used to set values for new objects, and they are called automatically when a new object is created.', 'The impact of using private attributes on subclass visibility is highlighted. Private attributes restrict visibility in subclasses, and using private attributes limits their access in subclasses or classes created from the original class.', "Static fields inside of classes are attributes that don't make sense for the animal to have, but are still useful to keep track of, exemplified by the concept of counting, which would not make sense for animals."]}, {'end': 2180.501, 'segs': [{'end': 1847.953, 'src': 'embed', 'start': 1825.483, 'weight': 0, 'content': [{'end': 1835.186, 'text': "So we'll say something like this and get the name of the animal is owned by and then let's go and get the owner of this object.", 'start': 1825.483, 'duration': 9.703}, {'end': 1841.669, 'text': "So we'll say this owner and once again we'll call that and demonstrate how all these different guys work here in a second.", 'start': 1835.407, 'duration': 6.262}, {'end': 1847.953, 'text': 'you can also have static methods, which are going to be class methods,', 'start': 1841.949, 'duration': 6.004}], 'summary': 'Demonstrating different methods and functionality in programming.', 'duration': 22.47, 'max_score': 1825.483, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1825483.jpg'}, {'end': 1925.922, 'src': 'heatmap', 'start': 1893.645, 'weight': 0.728, 'content': [{'end': 1896.906, 'text': "And then we'll say return this and weight.", 'start': 1893.645, 'duration': 3.261}, {'end': 1904.168, 'text': "And also, if we want to set our weight, it's going to have a weight passed inside of it that is going to be a number.", 'start': 1897.366, 'duration': 6.802}, {'end': 1910.152, 'text': "and then we'll just go this and the weight property is equal to whatever the weight they passed inside of there.", 'start': 1904.548, 'duration': 5.604}, {'end': 1915.675, 'text': 'and we use getters and setters so that we, in this situation, if they passed in a weight they contained like a string.', 'start': 1910.152, 'duration': 5.523}, {'end': 1916.436, 'text': "that didn't make sense.", 'start': 1915.675, 'duration': 0.761}, {'end': 1920.438, 'text': "we could just disregard it, but otherwise we're just going to leave it the way it is all right.", 'start': 1916.436, 'duration': 4.002}, {'end': 1923.921, 'text': 'so we just created a class to define animal objects.', 'start': 1920.438, 'duration': 3.483}, {'end': 1925.922, 'text': "let's go and create some animal objects.", 'start': 1923.921, 'duration': 2.001}], 'summary': 'Creating a class to define animal objects with getters and setters for weight.', 'duration': 32.277, 'max_score': 1893.645, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1893645.jpg'}, {'end': 1941.306, 'src': 'embed', 'start': 1910.152, 'weight': 1, 'content': [{'end': 1915.675, 'text': 'and we use getters and setters so that we, in this situation, if they passed in a weight they contained like a string.', 'start': 1910.152, 'duration': 5.523}, {'end': 1916.436, 'text': "that didn't make sense.", 'start': 1915.675, 'duration': 0.761}, {'end': 1920.438, 'text': "we could just disregard it, but otherwise we're just going to leave it the way it is all right.", 'start': 1916.436, 'duration': 4.002}, {'end': 1923.921, 'text': 'so we just created a class to define animal objects.', 'start': 1920.438, 'duration': 3.483}, {'end': 1925.922, 'text': "let's go and create some animal objects.", 'start': 1923.921, 'duration': 2.001}, {'end': 1931.064, 'text': 'so if you want to create an animal object in this situation, we could create one called spot.', 'start': 1925.922, 'duration': 5.142}, {'end': 1941.306, 'text': 'and how we do that is, we say new animal and we get past inside of here the name of the animal as well as who owns the animal.', 'start': 1931.064, 'duration': 10.242}], 'summary': 'Using getters and setters to create animal objects with specified attributes.', 'duration': 31.154, 'max_score': 1910.152, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1910152.jpg'}, {'end': 2023.494, 'src': 'embed', 'start': 1994.445, 'weight': 2, 'content': [{'end': 2000.151, 'text': "And reload it, and you're going to see number of animals is one because we created one total animal object.", 'start': 1994.445, 'duration': 5.706}, {'end': 2006.817, 'text': "Alright, so remember, I said that we're going to be able to create subclasses from these classes.", 'start': 2000.411, 'duration': 6.406}, {'end': 2016.187, 'text': "so what that basically means is we're going to be able to inherit all the methods and fields from another class using an operator called extends and,", 'start': 2006.817, 'duration': 9.37}, {'end': 2023.494, 'text': 'of course, you would also be able to add additional methods and fields, as well as overwrite methods that you would want to change in some way.', 'start': 2016.187, 'duration': 7.307}], 'summary': 'We created one total animal object and can create subclasses to inherit methods and fields.', 'duration': 29.049, 'max_score': 1994.445, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1994445.jpg'}, {'end': 2134.157, 'src': 'embed', 'start': 2111.679, 'weight': 3, 'content': [{'end': 2119.993, 'text': "let's go and do something like is a dog an animal, then inside of here going to throw some parentheses up inside of there?", 'start': 2111.679, 'duration': 8.314}, {'end': 2124.834, 'text': 'And we could say something like Grover instance of animal.', 'start': 2120.213, 'duration': 4.621}, {'end': 2130.136, 'text': 'And another useful thing is we could check to see if a field exists for an object.', 'start': 2125.154, 'duration': 4.982}, {'end': 2133.097, 'text': 'So before we call it, we want to check to make sure it exists.', 'start': 2130.236, 'duration': 2.861}, {'end': 2134.157, 'text': 'We could do so.', 'start': 2133.457, 'duration': 0.7}], 'summary': 'Using javascript to check if a field exists for an object.', 'duration': 22.478, 'max_score': 2111.679, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2111679.jpg'}], 'start': 1825.483, 'title': 'Class creation, inheritance, and object instantiation', 'summary': "Covers creation of a class for animal objects, instantiation of objects, static methods, getters, setters, and an example instantiation of an animal object. it also explains creating subclasses, inheriting methods and fields using 'extends', and verifying inheritance through 'instanceof', resulting in 2 animals created.", 'chapters': [{'end': 1974.495, 'start': 1825.483, 'title': 'Class creation and object instantiation', 'summary': "Covers the creation of a class for animal objects, including methods for getting and setting properties, instantiation of objects, and the concept of static methods. it also demonstrates the use of getters and setters, with an example instantiation of an animal object named 'spot' with a weight of 100.", 'duration': 149.012, 'highlights': ['The chapter covers the creation of a class for animal objects, including methods for getting and setting properties, instantiation of objects, and the concept of static methods.', "It demonstrates the use of getters and setters, with an example instantiation of an animal object named 'spot' with a weight of 100."]}, {'end': 2180.501, 'start': 1974.495, 'title': 'Classes and inheritance in typescript', 'summary': "Explains how to create subclasses and inherit methods and fields from another class using 'extends', and demonstrates creating a new dog class that extends the animal class and performs various operations, resulting in 2 animals created and verifying inheritance through 'instanceof'.", 'duration': 206.006, 'highlights': ["The chapter explains how to create subclasses and inherit methods and fields from another class using 'extends', resulting in 2 animals created and verifying inheritance through 'instanceof'.", "Demonstrates creating a new dog class that extends the animal class, creating a new dog object 'grover', and verifying the existence of a field for the object.", "Explains the concept of inheritance in TypeScript, including inheriting methods and fields from another class, and creating a new class 'dog' that extends the 'animal' class."]}], 'duration': 355.018, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU1825483.jpg', 'highlights': ['The chapter covers the creation of a class for animal objects, including methods for getting and setting properties, instantiation of objects, and the concept of static methods.', "It demonstrates the use of getters and setters, with an example instantiation of an animal object named 'spot' with a weight of 100.", "The chapter explains how to create subclasses and inherit methods and fields from another class using 'extends', resulting in 2 animals created and verifying inheritance through 'instanceof'.", "Demonstrates creating a new dog class that extends the animal class, creating a new dog object 'grover', and verifying the existence of a field for the object."]}, {'end': 2960.003, 'segs': [{'end': 2250.138, 'src': 'embed', 'start': 2226.085, 'weight': 0, 'content': [{'end': 2236.494, 'text': "So what we're going to do is I'm going to create a constructor and this constructor is going to have a property called wheels passed inside of it.", 'start': 2226.085, 'duration': 10.409}, {'end': 2244.402, 'text': "And of course it's going to be a number and that's going to automatically initialize number of wheels for my vehicle.", 'start': 2237.155, 'duration': 7.247}, {'end': 2250.138, 'text': 'Now, since I implemented the vehicle interface, that means I need to create our drive function.', 'start': 2244.69, 'duration': 5.448}], 'summary': "Creating a constructor with a 'wheels' property and implementing a 'drive' function for a vehicle interface.", 'duration': 24.053, 'max_score': 2226.085, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2226085.jpg'}, {'end': 2400.19, 'src': 'heatmap', 'start': 2338.636, 'weight': 1, 'content': [{'end': 2340.959, 'text': 'Change that to wheels and reload it.', 'start': 2338.636, 'duration': 2.323}, {'end': 2343.221, 'text': 'And now you can see the car drives with four wheels.', 'start': 2341.319, 'duration': 1.902}, {'end': 2344.683, 'text': 'The bicycle drives with two wheels.', 'start': 2343.241, 'duration': 1.442}, {'end': 2348.107, 'text': 'So another example of what we can do with interfaces.', 'start': 2345.044, 'duration': 3.063}, {'end': 2351.091, 'text': 'And now we will take a look at generic functions.', 'start': 2348.408, 'duration': 2.683}, {'end': 2359.009, 'text': 'Okay, so we use generic functions when we want to be able to work with multiple data types in similar ways, however.', 'start': 2352.068, 'duration': 6.941}, {'end': 2361.21, 'text': "And I'll just show you an example here.", 'start': 2359.669, 'duration': 1.541}, {'end': 2364.51, 'text': "So let's say we have something like function get type.", 'start': 2361.31, 'duration': 3.2}, {'end': 2368.451, 'text': "And then what we're going to do here is to create a generic function.", 'start': 2364.73, 'duration': 3.721}, {'end': 2373.992, 'text': "we're going to place one or more data type markers in angled brackets, just as you see right here.", 'start': 2368.451, 'duration': 5.541}, {'end': 2376.392, 'text': 'And this is going to be after our function name.', 'start': 2374.272, 'duration': 2.12}, {'end': 2381.293, 'text': "And then we're going to use those data type markers instead of actual data types.", 'start': 2376.692, 'duration': 4.601}, {'end': 2384.536, 'text': 'So this guy is going to be passed some value.', 'start': 2381.713, 'duration': 2.823}, {'end': 2389.26, 'text': "And once again, we're going to put in those data type markers right there.", 'start': 2384.936, 'duration': 4.324}, {'end': 2392.863, 'text': "And then what it's going to do is it's going to return a string.", 'start': 2389.66, 'duration': 3.203}, {'end': 2400.19, 'text': 'And for example, we could say something like return and then we could call type of and value in this situation.', 'start': 2393.324, 'duration': 6.866}], 'summary': 'Introduction to interfaces and generic functions in programming.', 'duration': 61.554, 'max_score': 2338.636, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2338636.jpg'}, {'end': 2373.992, 'src': 'embed', 'start': 2341.319, 'weight': 1, 'content': [{'end': 2343.221, 'text': 'And now you can see the car drives with four wheels.', 'start': 2341.319, 'duration': 1.902}, {'end': 2344.683, 'text': 'The bicycle drives with two wheels.', 'start': 2343.241, 'duration': 1.442}, {'end': 2348.107, 'text': 'So another example of what we can do with interfaces.', 'start': 2345.044, 'duration': 3.063}, {'end': 2351.091, 'text': 'And now we will take a look at generic functions.', 'start': 2348.408, 'duration': 2.683}, {'end': 2359.009, 'text': 'Okay, so we use generic functions when we want to be able to work with multiple data types in similar ways, however.', 'start': 2352.068, 'duration': 6.941}, {'end': 2361.21, 'text': "And I'll just show you an example here.", 'start': 2359.669, 'duration': 1.541}, {'end': 2364.51, 'text': "So let's say we have something like function get type.", 'start': 2361.31, 'duration': 3.2}, {'end': 2368.451, 'text': "And then what we're going to do here is to create a generic function.", 'start': 2364.73, 'duration': 3.721}, {'end': 2373.992, 'text': "we're going to place one or more data type markers in angled brackets, just as you see right here.", 'start': 2368.451, 'duration': 5.541}], 'summary': 'Introduction to interfaces and generic functions for working with multiple data types.', 'duration': 32.673, 'max_score': 2341.319, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2341319.jpg'}, {'end': 2739.084, 'src': 'embed', 'start': 2706.755, 'weight': 2, 'content': [{'end': 2707.575, 'text': 'So there you go.', 'start': 2706.755, 'duration': 0.82}, {'end': 2709.857, 'text': "That's how we can use generic classes.", 'start': 2707.615, 'duration': 2.242}, {'end': 2717.781, 'text': "Now what I'm going to do is talk about destructuring, which is going to provide a way for us to assign multiple values on one line.", 'start': 2710.237, 'duration': 7.544}, {'end': 2732.477, 'text': "So for example, let's say we had var and random vowels is equal to, and we'll have x colon 1 and y colon 2 and z colon 3.", 'start': 2718.524, 'duration': 13.953}, {'end': 2739.084, 'text': "Now, if I would want to automatically take the value that's assigned to x, y and z and assign those two separate variables,", 'start': 2732.477, 'duration': 6.607}], 'summary': 'Introduction to using generic classes and destructuring in javascript.', 'duration': 32.329, 'max_score': 2706.755, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2706755.jpg'}, {'end': 2827.197, 'src': 'embed', 'start': 2799.927, 'weight': 3, 'content': [{'end': 2804.191, 'text': "Right, so two more little guys I'd like to show you that make TypeScript different.", 'start': 2799.927, 'duration': 4.264}, {'end': 2807.674, 'text': 'And one of the really cool things are template strings.', 'start': 2804.611, 'duration': 3.063}, {'end': 2811.918, 'text': 'And this is going to allow us to create multi-line strings.', 'start': 2808.174, 'duration': 3.744}, {'end': 2816.902, 'text': 'So example, we could say something like var malt string is equal to.', 'start': 2811.978, 'duration': 4.924}, {'end': 2819.985, 'text': "And what we're going to do is do the back quote like that.", 'start': 2817.122, 'duration': 2.863}, {'end': 2822.047, 'text': "It's in the upper left-hand corner of your keyboard.", 'start': 2820.005, 'duration': 2.042}, {'end': 2827.197, 'text': 'And you could say something like, I go on for many lines.', 'start': 2822.327, 'duration': 4.87}], 'summary': 'Typescript introduces template strings for creating multi-line strings.', 'duration': 27.27, 'max_score': 2799.927, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2799927.jpg'}], 'start': 2180.501, 'title': 'Interface functions in vehicle contracts and typescript overview', 'summary': 'Discusses creating interface for vehicle contracts with detailed instructions for drive function, and provides an overview of typescript including constructors, generic functions, destructuring, template strings, spread operators, and enumerated types, showcasing practical applications and functionalities.', 'chapters': [{'end': 2225.684, 'start': 2180.501, 'title': 'Interface functions in vehicle contracts', 'summary': 'Discusses creating an interface for vehicle contracts, requiring all vehicle types to have a drive function returning any data type, with further details available in advanced tutorials on object-oriented design and design patterns.', 'duration': 45.183, 'highlights': ['Creating a contract that applies to all vehicle types, requiring a drive function inside it and returning any data type', 'Further details on advanced tutorials on object-oriented design and design patterns', 'Limitation on discussing advanced interface functionalities in this part of the tutorial']}, {'end': 2960.003, 'start': 2226.085, 'title': 'Typescript overview', 'summary': 'Explains the creation of constructors for vehicle types, usage of generic functions and classes, destructuring, template strings, spread operators, and enumerated types in typescript, demonstrating their practical applications and functionalities.', 'duration': 733.918, 'highlights': ['Creation of constructors for vehicle types Explains the process of creating constructors for vehicle types, initializing number of wheels for vehicles, and implementing the vehicle interface.', 'Usage of generic functions and classes Demonstrates the usage of generic functions to work with multiple data types, and the application of generic classes to work with different data types, providing practical examples and their outputs.', 'Destructuring and spread operators Illustrates the usage of destructuring to assign multiple values on one line and demonstrates the functionality of the spread operator to separate values in an array into attributes in a function, with practical examples and outputs.', 'Template strings and enumerated types in TypeScript Explains the use of template strings to create multi-line strings and demonstrates the application of enumerated types in TypeScript, providing practical examples and their outputs.']}], 'duration': 779.502, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-PR_XqW9JJU/pics/-PR_XqW9JJU2180501.jpg', 'highlights': ['Creation of constructors for vehicle types and initializing number of wheels', 'Demonstrates the usage of generic functions and classes with practical examples', 'Illustrates the usage of destructuring and spread operators with practical examples', 'Explains the use of template strings and demonstrates the application of enumerated types in TypeScript']}], 'highlights': ['TypeScript brings a type system and future capabilities of JavaScript, allowing seamless integration of JavaScript code into TypeScript.', 'The tutorial focuses on the core syntax of TypeScript and the process of compiling TypeScript into JavaScript.', 'The chapter emphasizes the importance of having a compiler when working with TypeScript.', 'The chapter covers working with arrays and math in TypeScript, including examples of addition, subtraction, multiplication, division, modulus, and handling string concatenation.', 'The chapter explains how classes define real world objects using attributes and methods, with an example of creating an animal class and defining its attributes and static fields.', 'The chapter covers the creation of a class for animal objects, including methods for getting and setting properties, instantiation of objects, and the concept of static methods.', 'The chapter covers working with arrays and math in TypeScript, including examples of addition, subtraction, multiplication, division, modulus, and handling string concatenation.', 'The chapter explains how classes define real world objects using attributes and methods, with an example of creating an animal class and defining its attributes and static fields.', 'The chapter covers the creation of a class for animal objects, including methods for getting and setting properties, instantiation of objects, and the concept of static methods.', "The chapter emphasizes the flexibility and similarity between JavaScript and TypeScript, highlighting TypeScript's capability to handle diverse data types."]}