Get Them Digits

In my last post, I spoke about the various data types utilized in programming. I gave an overview of the various types, but concentrated on text/string.

Today, I would like to focus on numbers/integers…

In programming, you are going to work with numbers/integers. It is inevitable. There are various ways in which you work with numbers/integers…

[code lang=”js”]
var n1 = 12.00;
// Written with decimals
var n2 = 12;        
// Written without decimals
var x = 123e5;     
// 12300000 scientific (exponential) notation
var z = 123e-5;    
// 0.00123 scientific (exponential) notation

Again, as I stated in my previous posting, I am using JavaScript in my examples. JavaScript plays “fast and loose” with data typing. If you are using a strictly typed language, make certain you are following those rules.

The typical practice with numbers is to store them in variables, then perform mathematical calculations (add, subtract, multiply, divide). That is typically as complicated as the math gets with programming. There is a nuance with addition, but I will cover that at a later date. How is that for a teaser?

So dive in and use numbers until your heart’s content…Happy Coding!

More To Explore

computer, laptop, work place-2982270.jpg

Unlocking Wireless Communication: A Dive into the Bluetooth API

Wireless communication has become an integral part of our daily lives, and Bluetooth technology is at the forefront of this revolution, enabling devices to exchange data over short distances and creating a world more interconnected than ever before. At the heart of this technology lies the Bluetooth Application Programming Interface (API), a powerful tool for developers looking to harness the capabilities of Bluetooth in their applications. In this blog post, we’ll explore what the Bluetooth API is, how it works, and the possibilities it opens up for innovation in wireless communication.

lighthouse, beacon, atlantic-8578318.jpg

Understanding the Beacon API: Simplifying Asynchronous Data Transfers

In today’s data-driven world, web applications often need to send data back to the server. Traditionally, this has been done using AJAX requests or similar methods. However, these techniques can come with a cost, especially when dealing with data that needs to be sent during the unload phase of a document, such as tracking and diagnostic data. This is where the Beacon API shines by allowing developers to send data to a server more reliably and efficiently.

Share This Post


Need help?

Let's have a chat...


Jump Back In!

Here at Webolution Designs, we love to learn. This includes sharing things we have learned with you. 


Begin Your Learning Journey Today!

Come back inside to continue your learning journey.