Saturday, April 25, 2020

How to install Postgres.app to use PostgreSQL database on Mac

In this tutorial we will learn to install Postgres.app to use PostgreSQL database on Mac.

What is Postgres.app?

Postgres.app is a full-featured PostgreSQL installation packaged as a standard Mac app. -- https://postgresapp.com

Download

Visit postgresapp.com and download the software on your Mac.
Run the installer and move the Postgres.app into the Applications directory.

Default settings

Postgres.app will install on your Mac with the following default settings.
Hostlocalhost
Port5432
Useryour system user name
Databasesame as user
Passwordnone
Connection URLpostgresql://localhost
Read more...

Sunday, April 12, 2020

ES6 - Template Literals (Template strings)

Watch the video tutorial: ES6 Template Literals (Template strings) #02

In this ES6 JavaScript tutorial we will learn about Template Literals (Template strings).

What are Template Literals?

Template literals are string literals that allows us to embed expressions, multi-line strings and string interpolation.
Template literals are enclosed using backtick ` ` instead of single quotes and double quotes.
Let's print the string Hello World using single and double quotes.
console.log('Hello World');
console.log("Hello World");
Now, let's print the same string using template literal.
console.log(`Hello World`);

Saturday, April 4, 2020

ES6 - var let const

Check out the tutorial video: ES6 var let const #01

In this ES6 JavaScript tutorial we will learn to create variables using var, let and const.

The var keyword

Alright, let's begin by creating a variable using the var keyword.
Let's say we want to create a variable x and assign it a value 10. So, we will write the following line.
var x = 10;
Now, if we want to print the value of x we can console log it by writing the following line.
var x = 10;
console.log(x);
And we get the output 10.
Few important points we must note while using the var keyword to declare variables.
We can redefine the same variable x again and we will not get any error.
So, we can write something like the following.
var x = 10;
console.log(x); // 10
var x = 20;
console.log(x); // 20

Read more...