insertBefore Function in Javascript

I came across this insertBefore function while I was working and it was interesting that in how many ways you can do what it does in Javascript.

Obviously it takes two parameters of new element and the one to insert data before but I am talking about “what will happen” using this funcrion.

“There is always more than one simple or straight forward way to do the job”.

This rule appliee in any coding situation well almost as far as coding has shown especially with a language like Javascript.

And the other thing is with trying different options in coding,  your mind learns to never stop and always be creative and alert to find out what possible solutions could be found.

It is a good practice for mind to learn “keep trying various ways of doing a task”.

So never stop practicing as perfection comes from lots of practice.

© 2020
Azadeh Faramarzi

This site is created and maintined by Azadeh Faramarzi , A passionate developer, sport and code lover who loves to share and write when she has some time.