Jennifer Bland header image
≡ Menu

How to format numbers in JavaScript using Intl.NumberFormat

If you ever wanted to format a number in JavaScript you were forced to use .toLocaleString(). The only challenge was this does not actually support locales. It uses the system locale. Now with the Intl.NumberFormat() to format any number into a currency value and format it based on a locale.

Here is an example of how we use to format numbers using .toLocaleString():

const money = 1000;

money.toLocaleString('en-US', { 
    style: 'currency', currency: 'USD' 
}); // $1,000.00

Now with ES6 JavaScript gives us the Intl object which is the ECMAScript Internationalization API. This API provides language sensitive number formatting.

Here is the same example as above:

[continue reading…]

How to add TailwindCSS to a Vue 3 App

There are two ways of creating a vue3 project. Using Vue-CLI or Vite. I will cover both.

Using Vite

If you do not already have Vite installed globally, you will need to install it. You can install it with this command:

npm install -g vite

Now that you have Vite installed you will need to create your Vue3 application. You can create it with this command:

[continue reading…]

Top 10 Interview Questions for Web3 Jobs

Web3 is the fastest growing number arena today in tech. Startup companies as well as established Web2 companies are both hiring people for web3 positions. If you want to break into Web3 then you need to be prepared for the interview process. Here are some of the most common questions you might face in an interview for a Web3 position.

1) What is Web3?

You might think this is a dumb question to ask if you are interviewing for a web3 position but it really isn't. This question will quickly weed out people who apply for a position because it is in a fast growing arena without fully knowing what it entails. If you can clearly articulate what is web3 then you have done your homework and know why you are applying for this position.

[continue reading…]

Solidity Visibility Modifiers

Visibility modifiers define the visibility for both state variables and functions. Visibility modifiers determine whether or not you are able to access a variable or execute a function.

Visibility Modifers

There are four visibility modifiers available in the Solidity programming language. They are:

  • public
  • private
  • internal
  • external

[continue reading…]

Introduction to Solidity – Write your first Smart Contract using Solidity

Solidity is a programming language used for writing smart contracts on the Ethereum blockchain. I will show you how to get started with solidity and how to write your very first hello world smart contract.

What is Solidity

Solidity is an object-oriented high-level language for implementing smart contracts. Solidity is influenced by other programming languages like JavaScript C++ and Python.

The syntax of the solidity programming language is similar to JavaScript. If you're familiar with JavaScript, then you should find it easier to learn and understand solidity. But there are some differences between JavaScript and solidity.

[continue reading…]