Tag: VAR

How to round a number to two decimal places in JavaScript

The rounding of numbers is an essential part of programming languages. Rounding refers to the process in which a number is made simpler, but its value is kept close to the initial value. It aids in estimating and utilizing a number according to the user’s needs. Users can, therefore, round numbers to 2 decimal places by using different methods in JavaScript. ...
Continue Reading How to round a number to two decimal places in JavaScript

How to use Azure Management APIs in C# with Azure.Identity

Azure offers a wide range of management APIs to automate a range of actions that can be performed in the Azure portal. These include things… ...
Continue Reading How to use Azure Management APIs in C# with Azure.Identity

How to get the current date and time in JavaScript

When developing web applications, it is necessary to include the current date and time on which a particular operation was performed according to the user’s local zone. This requirement can be filled out using the date class. For instance, when you submit data via a form, you may want to include the date that the data was created or when the data was submitted. ...
Continue Reading How to get the current date and time in JavaScript

JavaScript Cheatsheet

#javascript #webdev #tutorial #programming ...
Continue Reading JavaScript Cheatsheet

How to compare strings in JavaScript

When programming in JavaScript, you will encounter various situations where you must compare two strings before performing an operation. For instance, a user can only log in to a website if its name matches the existing names stored in the database. In such situations, the ‘Strict Equality Operator’ compares the strings. The functionality of comparison in JavaScript is not only limited to value-based comparisons. Strings are compared for various reasons. Some of the...
Continue Reading How to compare strings in JavaScript

How to make a clean code with JavaScript Ternary Operator

We will explore a ternary operator in Javascript in this tutorial and see how helpful it is for clear code. Every developer or programmer aspires to write clean code since it is a good practice. To shorten the code, use the ternary operator (?:) in JavaScript. ...
Continue Reading How to make a clean code with JavaScript Ternary Operator

Mondrian Art in CSS From 5 Code Artists

Mondrian is famous for paintings with big thick black lines forming a grid, where each cell is white, red, yellow, or blue. This aesthetic pairs well with the notoriously rectangular web, and that hasn’t gone unnoticed over the years with … Mondrian Art in CSS From 5 Code Artists originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
Continue Reading Mondrian Art in CSS From 5 Code Artists