Skip to main content

Posts

Showing posts from September, 2017

Lets's Learn Document Object Model

Lets's Learn Document Object Model  The " DOM "document object model) allows JavaScript to access the content of a web page.The DOM is like a class monitor, where HTML elements are the like the students of a class.It monitors or keeps track of HTML documents. JavaScript is like class teacher it tell the monitor to do something. Or in other words JavaScript can manipulate HTML elements with DOM. Show Me your ID In DOM you can give  unique names to HTML elements, these are called Id of the element, further this id can be used by JavaScript to manipulate or access the HTML elements.To give id to an element you can use id attribute like this ; <h1 id="Hello" >Hello</h1> ID  Hello then can be then used to access the heading tag <h1> later by Javascript. Let's Catch this guy Now, when we have the name given we can catch this guy and manipulate it. To use this element we use method document.getElementById in our

Powerful Tips for writing better code and increasing productivity

Useful Tips for writing better code and increasing productivity                       I entered the world of programming back in 2011. I had no formal education in programming, I just brought a book and started learning.Today when I look at my journey I realize it I made a lot of mistakes while learning programming and it's not possible to avoid all of them and according to me you should not avoid some of the mistakes that I am made, as these mistakes teach you a lot about programming but there are some mistakes that you should avoid no matter if you are a beginner or an intermediate or an expert. I am about to share some tips with you , you may have heard many of these earlier from other people or if you are studying in some school or university from your teachers or may be you never thought about these.                             Variable Confusion Tip #1  While writing your code please make sure that the variables are defined in a manner that even after