Posts

Showing posts from October, 2019

JavaScript Data structures part I, JavaScript Objects.

1.JavaScript Object. An Object is a collection to properties,  and a property is an association between a name (or key) and a value, every property has a unique key string that is unique within that object.  Creating objects  There are a lot of ways of creating JavaScript objects here i am going to discuss only three of them. Using object constructor             var newObject = new Object(); Using Object prototype's create method            var newObject = Object.create(null)//this will create an empty object since we passed null in it Using bracket syntax sugar{}          var newObject = {}//this also will create an empty object as well. I.Getting properties from objects  There are two ways of getting property values from objects;,one is through dot notation and the other is through square brackets. For example consider the following object. var...

Install Docker Engine - Community for Ubuntu

Install Docker Engine - Community for Ubuntu First make sure to uninstall  older versions of docker by running  $ sudo apt-get remove docker docker-engine docker.io containerd runc Step 1: $ sudo apt-get update Hit:1 http://ppa.launchpad.net/flexiondotorg/youtube-dl-gui/ubuntu disco InRelease Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:3 https://deb.nodesource.com/node_12.x disco InRelease                      Ign:4 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease      Hit:5 http://tz.archive.ubuntu.com/ubuntu disco InRelease                       Hit:6 http://ppa.launc...