JavaScript
JavaScript is probably the main category of this blog. Here you will find articles covering JavaScript in general, as well as related technologies such as TypeScript, jQuery, and Vue.js.
The posts in this section include both practical development examples and discussions of specific technical topics. Some articles focus on real-world tasks, such as creating small plugins or solving typical frontend problems, while others explore particular aspects of the language, including working with dates, objects, and other common JavaScript patterns.
Most examples are based on practical situations that I encountered during real development work, so the articles often contain ready-to-use snippets and solutions that can be applied in real projects.
Working with Cookies in JavaScript
Last updated: 09.02.2026
Views: 138
Сookie (web cookie or browser cookie) is a string of information that can be stored in a browser and sent to the server.
The maximum size for one cookie is 4096 bytes. The number of cookies for one domain can be from 20 to 242, depending on the browser.
Cookies are written as a string, but on a key-to-value basis.
[js]document.cookie = "username=John Brown";[/js]
Cookies may contai...
Finding the Distance Between Two Points on a Map Using JavaScript (TypeScript)
Last updated: 04.01.2026
Views: 258
If you have the coordinates of two points on a map, calculating the distance between them is a fairly straightforward task. This type of calculation is commonly used in mapping applications, delivery services, navigation systems, and location-based features. In this example, we will focus on determining the distance using geographic coordinates such as latitude and longitude. These values allow us...
Converting an Image to Base64 Using JavaScript
Last updated: 06.12.2025
Views: 208
Converting an image to a Base64 string in JavaScript can be extremely useful in many modern web development scenarios. One of the most common reasons for using Base64 is to send image data through an API, where binary files might not be accepted directly. Base64 is also convenient when you want to display a preview of an uploaded image before sending it to the server. Instead of uploading the file...
Vue Accordion Component
Last updated: 13.03.2026
Views: 604
A simple and lightweight Vue 3 accordion component plugin. Supports both global plugin registration and local component usage. Written in TypeScript. The accordion component contains a minimum of CSS styles, which makes it easy to integrate into any of your designs. You can install the component using the NPM or Yarn package managers. The component allows you to configure the ability to have one o...
Iterating Elements of Array without Loops
Last updated: 27.08.2025
Views: 355
The examples are very abstract because there are cycles. Our condition will be as follows. It is necessary to select all elements of the array by a given attribute. Or, to put it more precisely, it is necessary to filter the array. There are several solutions.
The most suitable option in PHP is to use the built-in function array_filter(). Let's imagine that it does not exist either. We write it...