Deep Tech Point
first stop in your tech adventure
Home / Javascript
October 25, 2021 | Javascript

The break is one of the reserved keywords in JavaScript and we often associate it with when wanting to break the loop. This article is going to present some theoretical basics that are necessary to understand the break statement and some of the most common examples of break statement applications. For a beginning, let’s take a look at the official definition, and afterward we will take each part of it, explain how it works, and see for ourselves through examples.

October 21, 2021 | Javascript

arguments is a reserved keyword in JavaScript. Arguments is an array-like object that you can access inside all non-arrow functions. That object contains the values of the arguments that are passed to that function. arguments object is a local variable available within all non-arrow functions.

Let’s take a look at that definition step by step.

October 5, 2021 | Javascript

Have you ever wondered why you were able to call a function before you wrote it? If this is the case, this article is going to answer this question! We are going to dig into one of the basic concepts in JavaScript – we are going to teach you what is hoisting in JavaScript and why it’s important. Let’s get started!

October 2, 2021 | Javascript

In this article, we are going to teach you, step by step, how you can create a very simple single page application. We are going to create it by showing and hiding div elements. SPA means we have single DOM page and using JavaScript we simulate multi page website by showing and hiding elements. Other option, which we are going to explore in another tutorial, is to create elements we need for a “page” and delete elements we don’t need at some point. You will need just a little knowledge of HTML, CSS, and some very basics of JavaScript. We will also embed code example, which will present this single page application and we will go through each line of code and each section so you can see exactly what we are doing. If you’ll go through the example, you will also notice some comments in the code, which will probably add another dimension for you to clarify things that are unclear. Let’s get started.

September 30, 2021 | Javascript

It is super important to understand basic concepts of JavaScript and scope is definitely one of them – you cannot work in JavaScript, if you don’t understand what scope is and this is the main reason we prepared this article.

September 21, 2021 | Javascript

JavaScript is an event-driven programming language, this is why the event is an essential part of JavaScript. In this article, you will learn what is an event, what are even handlers, and most importantly what is an eventlistener and what is an addEventListener() method.

July 9, 2021 | Javascript

This article is going to discuss the difference between passing by value vs passing by reference in JavaScript. We will look at the concept of primitive values and objects which are closely connected to the concept of passing value vs reference. How is that? Well, this almost answers the question from the headline. The main difference between passing by value and passing by reference is that the first is closely connected to primitive values or primitives, while the second takes place when assigning objects. In theory, this sounds neat, but really, let’s take a look at the examples and the concept of passing by value vs reference will be much clearer.

June 4, 2021 | Javascript

Generating random numbers, such as shuffling playing cards, rolling dice, or spinning roulette wheels are all examples of potential JavaScript projects where you could be using the JavaScript Math.random() method.

In this tutorial, we will help you understand how to generate a random number using the Math.random() method by building simple shuffling playing cards app.

May 31, 2021 | Javascript

Usually, a piece of JavaScript code is executed synchronously, this means the code runs line after line as it’s written after hoisting in one thread. However, there might be situations when you need to run a block of your code at some point later in the future – when you need to delay the execution of some instructions. This concept of telling your code to work asynchronously is called ‘scheduling a call’ – as simple as that. There are two methods in JavaScript that enable to schedule a call – (nested) setTimeout() and setInterval(). A very simple explanation would say setTimeout() runs the code once after the timeout – it fires once or it runs the call only once after an interval, while setInterval() runs the code repeatedly, with the length of the timeout between each interval – it repeats the call, it fires again and again in intervals.

In this tutorial, you’ll learn how these two methods work, what is the difference between (nested) setTimeout and setInterval and we’ll give you some practical examples to understand these concepts a bit better.

May 25, 2021 | Javascript

Sometimes it can be hard to remember the difference between substring and substr methods, but let’s make this article a quick reminder to help you out with understanding the substring and substr difference.