Technical Blog 3

An analogy to describe the differences between HTML and CSS

HTML is all about bare and disciplined structure like basement, walls and pillars of a house. CSS is the paint, artwork and home decor.

Explain control flow and loops using an example process from everyday life, for example 'waking up' or 'brushing your teeth'.

Control flow means things happening in an order and in a day to day, it is like waking up and then brushing teeth and not the other way around.Loop is a repeation of certain tasks again and again when certain conditions are met and in a day to day life, it's like waking up and brushing teeth every single day when the day starts.

Describe what the DOM is and an example of how you might interact with it.

DOM is document object model and it represents HTML as tree like structure. This makes an easier understanding of code by breaking HTML into smaller meaningful chunks.

Explain the difference between accessing data from arrays and objects.

Data in arrays are ordered lists and they can accessed with numerical values starting from 0. On the other hand, values in objects are accessed using strings like bills, payments etc.

Explain what functions are and why they are useful.

Functions are pre-defined piece of code that will be executed when called. It is very useful when certain tasks needs to be done repeatedly in a program.