October 2022

How to Draw a Christmas Tree in Python (3 Different Ways)

Drawing a Christmas tree with asterisks (*) in Python isn’t probably the most impressive Christmas present, but it offers a nice challenge that tests your understanding of loops. This guide teaches you how to draw Christmas trees in Python in three different ways that incorporate loops and recursion. Let’s jump into it! Drawing Christmas Trees

How to Draw a Christmas Tree in Python (3 Different Ways) Read More »

Difference Between ‘git add . ‘ and ‘git add -A’ (with Examples)

Have you ever wondered what’s the difference between the commands git add . and git add -A? The detailed answer depends on the Git version you’re using. In Git 2.x (which you are likely using): Let’s take a look at the differences between different options of the git add command. Besides, you’ll find a concrete

Difference Between ‘git add . ‘ and ‘git add -A’ (with Examples) Read More »

JavaScript ‘throw new Error’ vs ‘throw Error’ vs ‘throw something’

In JavaScript the difference between throw Error and throw new Error is that: When it comes to behavior, there’s really no difference between throw Error and throw new Error. For example: But the more technically correct way to throw a new Error object is by using the throw new Error instead of throw Error. Also,

JavaScript ‘throw new Error’ vs ‘throw Error’ vs ‘throw something’ Read More »