TypeScript vs. JavaScript: Side-by-Side Comparison
TypeScript is a modern language and the superset of JavaScript with additional features such as type safety, readability and maintenance.
CARVIEW |
TypeScript is a modern language and the superset of JavaScript with additional features such as type safety, readability and maintenance.
Learn to create new Date objects in TypeScript, and modify, compare and format them to custom and inbuilt locale-specific patterns.
Learn how to find an element in an array using inbuilt methods or write custom logic using examples in JavaScript or TypeScript.
Learn to check if a given variable is a number or not. in JavaScript and TypeScript, using Number.isFinite() and typeof() functions.
In TypeScript, filter(testFunction) is a built-in function available for arrays that returns a new array of elements satisfying a given condition.
TypeScript supports callback functions to make your program asynchronous. A callback function is a function which is scheduled to be called after some asynchronous processing is completed.
In JavaScript, a variable is said to be “undefined” if it has been declared but not initialized. Whereas “null” is assigned to a variable whose value is absent at the time of initialization. In simple words, when we do not assign any value to a variable, the JavaScript engine treats …
In TypeScript (or JavaScript), we can compare the two variables with either equality operator (‘==’) or strict equality operator (‘===’). Both comparison operators seems almost similar; but the way, they compare two given variables, is very different. The equality operator compares only the value after applying the type coercion, if …
Variable hoisting in JavaScript means to move all variable declarations to top of function. This means that if we declare a variable at the end of a function, the runtime will hoist it to the top and we will not have any error if we would have used that variable …
In JavaScript, Truthy expressions evaluate to boolean true value and Falsy expressions evaluate to boolean false value. Unlike other programming languages, truthy and falsy values are not limited to boolean data types and comparisons. They can have many other forms. Let us learn what makes an expression truthy or falsy …
Masking sensitive information is very practical need of applications which deal with sensitive customer data. For example, banking applications. When these applications run inside organization intra-net, many times UI logs are generated and stored on user’s machine for debugging purpose. In above scenario, it is regulatory requirement to mask all …
Jasmine tutorial to learn setup instructions, jasmine suite and specs, setup and teardown methods, describe blocks, jasmine matchers, jasmine spies etc.
If you have worked on javascript then you must have noticed the equality and identity operators to compare objects or values. Many developers do not understand the correct version they use in specific scenarios. The correct decision is based on the knowledge of how they work. Let’s understand. 1. Difference …
We know that what global variables or constants are, these are fields which are accessible application wide. In java, it is done usually done using defining “public static” fields. Here by adding final keyword, we can change the global variable to global constant. So easy, right? But what about javascript? …
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.