Posts

Basic Concept In TypeScript Day 10

Image
Lecture 10 : Basic Concept In TypeScript Constructor : A constructor is a special method which will be called whenever we create new objects. And generally used of initializing the class members.  The constructor method is always defined with "constructor" keyword. The members of the class in a constructor are accessed using "this" keyword. Syntax :            constructor (){                                     //statements                                     } Example : Program- Output- Inheritance : In TypeScript, we can use common object-oriented patterns. One of the most fundamental patterns in class-based programming is being able to extend existing classes to create new ones using inheritance. Types of  Inheritance : We can class...

Learn TypeScript Configuration Day 9

Image
Lecture 9 : Learn TypeScript Configuration TypeScript Configuration : TypeScript is a primary language for Angular application development. It is a superset of JavaScript with design-time support for type safety and tooling. Browsers can't execute TypeScript directly. Typescript must be "transpiled" into JavaScript using the tsc compiler, which requires some configuration. This page covers some aspects of TypeScript configuration and the TypeScript environment that are important to Angular developers, including details about the following files : tsconfig.json —TypeScript compiler configuration. The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. The tsconfig.json file specifies the root files and the compiler options required to compile the project. typings —TypesScript declaration files. Use TypeScript type definition files—d.ts files—to tell the compiler about the libraries you load. Configur...

Concept Of TypeScript Day 8

Image
Lecture 8 : Concept Of TypeScript What is TypeScript : TypeScript is a strongly typed, object oriented, compiled language.  “TypeScript is JavaScript for application-scale development.” TypeScript is both a language and a set of tools. TypeScript is a typed superset of JavaScript compiled to JavaScript. History of TypeScript : In 2010, Anders Hejlsberg , a core member of the development team of C# language, started working on TypeScript at Microsoft.  The first version of TypeScript was released to the public in the month of 1st October 2012, and was labeled as version 0.8. Now, it is maintained by Microsoft under the Apache 2 license.  The latest version of Typescript is TypeScript 3.5, which was released to the public on May 2019. Features of TypeScript : TypeScript is just JavaScript : TypeScript starts with JavaScript and ends with JavaScript. Typescript adopts the basic building blocks of your program from JavaScript. Hence, yo...

Learn Node JS For JavaScript Day 7

Image
Lecture 7 : Learn Node JS For JavaScript Editor : VS Code Compiler : Node JS Package Manager : NPM VS Code : VS Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. What is Node.js : Node.js is an open source server environment. Node.js is free. Node.js runs on various platforms (windows, Linux, Unix, Mac OS X, etc). Node.js uses JavaScript on the server. Why Node.js :  A common task for a web server can be to open a file on the server and return the content to the client. Here is how PHP or ASP handles a file request: Sends the task to the computer's file system. Waits while the file system opens and reads the file. Returns the content to the client. Ready to handle the next request. Here is how Node.js handles a file request: Sends the task to the computer's file system. Ready to handle the next request. When the file system has opened and read the file, the server returns the content to the client. Node.js el...

VS Code In JavaScript Day 6

Image
Lecture 6 : VS Code In JavaScript What is VS Code : Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. VS Code was announced on April 29,2015 by Microsoft at the 2015 Build conference. Why did we build VS Code : Visual Studio Code combines the simplicity of a source code editor with power developer tooling, like IntelliSense code completion and debugging. First and foremost, it is an editor that gets out of your way. The delightfully frictionless edit- build- bebug cycle means less time fiddling with your environment, and more time executing on your ideas. IntelliSense : IntelliSense is a general term for a variety of code editing features including : code completion, parameter information, quick information, and member list. IntelliSense features are sometimes called by other name such as "code completion", "content assist", and "code hinting". ...

Understanding Closures In JavaScript Day 5

Image
Lecture 5 : Understanding Closures In JavaScript Closure : Closure is one of important concept in JavaScript. It is widely discussed and still confused concept. Most of the JavaScript developers use Closures consciously or unconsciously. Even if they do unconsciously it works fine in most of the cases. But knowing closure will provide better control over the code when using them. And another reason for learning closure is that it is the most frequently asked question in the interview for the JavaScript developers. Closure means that an inner function always has access to the vars and parameters of its outer function, even after the outer function has returned. The Lifetime of JavaScript Variables : 1) Local Variable 2) Global Variable                 -The lifetime of JavaScript variable starts when it is declared. 1) Local Variable : Local variables are declared when the function is completed. A function can also access variables defined outside ...

Learn Shadowing In JavaScript Day 4

Image
Lecture 4 : Learn Shadowing In JavaScript Shadowing Problem : Shadowing is an informal way for someone to learn what it is like to perform a particular job at a workplace. An individual follows around, or shadow, the worker already in that role. Shadowing is not restricted to individuals who are new to the professional workforce, as it can be an equally useful tool for those in established careers who are looking to pivot to new directions. There are two concepts of Shadowing:                1) Variable Shadowing                2) Function Shadowing Outer variable or function is shadowed by the inner variable or function. Inner variable or function is mask of outer variable or function. Example : Program- <html> <body> <script> function fun() {     var f1 = 10;     alert(f1); } function fun() {     var f2 = 20;     alert(f2); } fun(); <...