Posts

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(); <...

Data Type Of JavaScript Day 3

Image
Lecture 3 : Data Types Of JavaScript Data Types : Data type variables can hold many data types: string, number, boolean. To be able to operate on variables, it is important to know something about the type. There are three main data types in JavaScript:           1) string           2) number           3) boolean 1) string : A string is a series of characters like "John Doe". String are written with quotes. You can use single or double quotes: Example :       1) var name = "Mayuri"; // using double quotes       2) var name = 'Mahesh'; // using single quotes 2) number : JavaScript has only one type of numbers. Numbers can be written with, or without decimals. Example :       1) var x1 = 34.00 ; // using with decimal       2) var x2 = 34; // using without decimal 3) boolean : Booleans can only have two values: true or false. Booleans are often used in cond...

Concept Of JavaScript Day 2

Image
Lecture 2 : Concept Of JavaScript Var for Declaration : Declaration a variable in JavaScript has always traditionally been done with the for keyword. Declaration: var=10 We just declared a variable named a with the value 10. We can also declare a variable inside of a function:           function f()            {                var message="Hello world!";                return message;            } Global Pollution : If we do not declare variable with var keyword then the variable become global, so anyone can access the variable at any time. Polluting the global means that you can define to many variables that are globally accessible it may leads to generate errors because access is not restricted. Example : Program- <html> <body> <b>This is a first program</b> <script> function f1() {   ...