Creating Random Numbers in JavaScript using the Date Constructor
When using Math.random() in JavaScript we create a random number between 0 and less than 1. What if we want to create a random number that is greater than
I am a Full Stack Developer with over 5 years of experience. I have worked with different tech stacks such as: Groovy/Java, PHP, .NET/.NET Core (C#), Node.js, React, Angular, and Vue.
communicode.io
When using Math.random() in JavaScript we create a random number between 0 and less than 1. What if we want to create a random number that is greater than
We can use JavaScript's FileReader object which is part of the Web API in order to hash our file. FileReader allows us to asynchronously "read the content
I recently wanted to programmatically create several objects with dynamic keys inside another object (basically an object of objects) when working with Typ
never is a data type of values that will never happen. We use never in a function that will never reach the end of that function or when narrowing a type t
Introduction The unknown type in TypeScript is a type which we can assign any value of any data type to while still leveraging TypeScript's type checking.
Conditional types in TypeScript are types are created on the basis of a condition. Structure type nameOfType = aType extends anotherType ? TrueType : Fal
TypeScript gives us as powerful feature called mapped types, which allows us to iterate (map) over different types or a union of different types and merge
Introduction Functions in which the return value is a boolean and is used in order to determine what data type is a variable is known as a Type Predicate.
Type and Type alias A type is used how our data will look (e.g. number, string, Array, etc.). A type alias gives us a way of assigning names that we choos
When a variable is declared, it is accessible in areas of the program that are after where was it declared. For example, if you declare a variable outside
Python has styling conventions. These styling conventions are defined in the Python Enhancement Proposals (PEP8). Here are the condensed version of the r
In Python, any file that has a py file extension (a Python file) is considered a module. This allows us to import these modules into other files. Suppose
We are able to program using Object Oriented Programming (OOP) in Python. We can create classes, objects and methods. Examples A class is defined in the
Sets are another important data structure in Python. They differ from dictionaries in that they don't have keys and they differ from tuples in that they a
Another data structure in Python are dictionaries. Dictionaries allow us to create a collection composed of key/value pairs. Examples person = {'name': '
Tuples are another data structure available in Python. Tuples give us the ability to create objects that are immutable. One of the differences between tu
Lists are one of the data structures in Python. It is considered an important data structure in Python. Examples A list of integers: numbers = [1,2,3]
As stated in a previous blog post, all data types in Python are objects. Objects are composed of methods and attributes. In Python these are accessed usin
An overview of functions in Python
The types of loops in Python and how they work.
Introduction Control statements in Python differ slightly from control statements in languages such as Java, C#, and JavaScript. Structure The structure
Strings in Python can be enclosed in either single or double quotes: 'Hello' "Hello" Concatenating strings can be done by using + operator: greeting = "Go
What boolean operators can be used in Python and how to use them?
How do you declare a variable in Python? How do you check what the data type of the variable is?