The Basics of Programming Paradigms

I was previously asked in a job interview about the different types of programming languages. Specifically, I was asked about the C programming language. I answered that it was a structured language, but the interviewer said otherwise, that it was not structured but imperative. To my knowledge, structured languages are…

New operators and keywords in ES6 JavaScript

1) Let Keyword Previously, using the var keyword in JavaScript caused problems in some cases. JavaScript by default moves all var declarations to the top of the scope, a process called hoisting. Introducing let prevents hoisting and keeps the variable declaration to the nearest block. Below is one issue: function…

Are the const and readonly keywords in C# similar?

const and readonly keywords might seem to be alike; they both are used to modify attributes and properties in a class and are immutable values. So what are const and readonly modifiers and what are their differences? What is a const? Constants are immutable values and modifiers; they contain a…

When to use a class or struct in C#?

Structs are value types that contain small groups of variables related to each other. An example of a struct could be characteristics of an inventory item or x-y coordinates and a point. In C#, the int, double, bool, and char types are all structs. An example of a struct: \\ struct…