Deep Tech Point
first stop in your tech adventure
Home /
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.

May 23, 2021 | Javascript

In this tutorial, we are going to create a relatively simple battle simulator project with n <= 5 battle units to fight between each other. The aim of the project is to achieve a complete and working JavaScript code. With this code, we will cover a lot of JavaScript language and coding concepts, such as object literal vs object constructor notation, functions vs. arrow functions – what’s the difference, and when and why to use each. We will also take a look at the concept of randomization and how Math.random() and Math.floor() methods can work in our favor. This will hopefully help you understand these concepts a bit better than reading about them individually. Let’s get started.

May 22, 2021 | Javascript

JavaScript is a very flexible programming language and often one problem can be solved in a few different ways. However, some ways are more appropriate and efficient for some problems than others. JavaScript is also an object-oriented programming language, which might be a bit puzzling when it comes to the creation of an object. Why?

May 17, 2021 | PHP

Developers often need to escape special characters when they’re coding and PHP is not an exception neither. In PHP we’re familiar with an abundance of escaping functions and some of them deal with encoding HTML entities. In addition, MySQL is also particular when it comes to special characters and it has its own set of rules: they are usually covered with escaping functions such as addslashes. However, when we talk about storing JSON in MySQL the approach in escaping special characters is a bit different.

May 15, 2021 | Javascript

Is closure a function? What is a nested function? What is a function scope? What is lexical environment and how does it work?
In this article, we’re going to answer all these questions and more – we are going to learn what functions and closures in JavaScript are, and most of all what is the main difference between functions and closures.

May 11, 2021 | Learn programming

Functions and procedures are probably some of the most common words in programming terminology you will hear, and occasionally people even use these terms interchangeably, which is, you guessed it, wrong. Therefore, the question we will explore in this article is, what is a function, a procedure, the difference in programming language terminology between function and procedure, and most of all what is the difference in terms of function vs. procedure functionality and their use. So, let’s dig it.

May 10, 2021 | Javascript

We already wrote about querySelector(s) in the article where we compared querySelector to getElementById. In that article, we covered the basics, but there is so much more to querySelectors in JavaScript. They are a superpowerful tool, so we really want to introduce you to some basic and a bit more complex QuerySelector rules in JavaScript.

April 22, 2021 | Javascript

In this article, we will take a look at JavaScript render-blocking. We recognize 3 types of render-blocking, as stated in the title of this blog post, but first, let’s take a look at what (browser) rendering is.