Blogs - Programming

RSS Stack Abuse

  • Square Root in JavaScript 2022-05-10
    In this short tutorial, learn how to perform a square and cube root in JavaScript, with the built-in Math object, and take a look at edge cases in which you might receive unexpected results.
    Joel Olawanle
  • Convert String to Boolean in JavaScript 2022-05-09
    In this guide, learn how to convert a string to a boolean in JavaScript, using the identity operator (===), regex, the Boolean wrapper and double not (!!) operator, through practical code with good practices.
    Joel Olawanle
  • JavaScript: Get Min and Max Element of Array 2022-05-06
    In this guide, learn how to get the largest and smallest (min and max) elements of an array in JavaScript, using `Math.min()` and `Math.max()` methods, the spread operator, the `reduce()` method, the `apply()` method and a `for` loop.
    Joel Olawanle
  • JavaScript: Check if Variable Is a String 2022-05-05
    In this tutorial, learn how to check whether a variable is a string or not in JavaScript - both for implicitly and explicitly created Strings, with or without the new keyword, as well as with Lodash.
    Joel Olawanle
  • JavaScript: How to Get the Number of Elements in an Array 2022-05-04
    In this tutorial, learn how to get the number of elements in a JavaScript array/list, using the length property, a manual for loop with a counter, how to count elements of nested arrays by flattening arrays and manually counting through, etc. with practical code examples.
    Joel Olawanle
  • How to Remove Duplicates From an Array in JavaScript 2022-05-03
    In this tutorial, learn how to remove duplicates from an array in JavaScript with a Set, forEach(), reduce(), includes() and filter().
    Joel Olawanle
  • How to Get the Number of Days Between Dates in Java 2022-05-02
    In this tutorial, learn how to calculate/get the number of days between two dates in Java - whether they're LocalDate objects, or Strings, using ChronoUnit, Joda-Time, Period, etc.
    Branko Ilic
  • Guide to React Component 2022-04-20
    Introduction A component is the probably most important concept to understand in React. It is one of the core building blocks of React that allows us to split a UI into independent, reusable pieces, making the task of building UIs much easier. All of these independent components are then combined
    Joel Olawanle
  • How to Create a Draggable Carousel Using Vanilla JavaScript 2022-04-20
    Introduction A website's carousel or slider is an effective way to display multiple images or content in a single space. It encourages visitors to concentrate on important website content while also improving overall visual appeal by saving screen space. In this article, we will learn how to create a draggable
    Joel Olawanle
  • Get Length of JavaScript Object 2022-04-20
    Introduction Objects are used to store a set of properties, each of which can be thought of as a link between a name (or key) and a value (a collection of key-value pairs). In this guide, we will learn how to get the length of a JavaScript object. Checking the
    Joel Olawanle
  • Guide to React Event Management 2022-04-19
    Introduction Events usually represent some type of interaction between the user and the app - any time a user clicks on the object, types in the input field, drag or drop some element, and so on. Therefore, each event usually requires some type of reaction from the app. Each time
    Joel Olawanle
  • Guide to Deploying a React App to Netlify 2022-04-18
    In this guide, learn how to deploy a React JavaScript application to a live Netlify server, via the drag and drop interface, Netlify CLI, Netlify Dashboard, from a Git provider like GitHub, GitLab and BitBucket.
    Joel Olawanle
  • Lists vs Tuples in Python 2022-04-15
    Introduction Lists and tuples are two of the most commonly used data structures in Python, with dictionary being the third. Lists and tuples have many similarities: They are both sequence data types that store a collection of items They can store items of any data type And any item is
    Nicholas Samuel
  • Guide to Sets in Python 2022-04-14
    Introduction In Python, a set is a data structure that stores unordered items. The set items are also unindexed. Like a list, a set allows the addition and removal of elements. However, there are a few unique characteristics that define a set and separate it from other data structures: A
    Nicholas Samuel
  • Guide to Dictionaries in Python 2022-04-13
    Introduction Python comes with a variety of built-in data structures, capable of storing different types of data. A Python dictionary is one such data structure that can store data in the form of key-value pairs - conceptually similar to a map. The values in a Python dictionary can be accessed
    Nicholas Samuel