Thank you for your response.In the above code snippet i am invoking showIt() function in a couple of other functions and would like to make function as property.I am not sure prototype pattern is the right pattern here to use, basically trying to refactor the code.So suggest me if there is better way (reusable,readable ,maintainable etc) of writing the above code ?
Okay - functions should be no more than 5 lines of code.
Is the deleteFoo statement a missing function parameter, accessed as a global variable, or does it appear further down? The functions should appear before the code that uses them, so that a person reading through the code trying to understand it doesn’t have to scan up and down trying to work out if something is missing.
Are the something and something else parts in cond1 and cond2 the same? If so then further optimisation can occur there.
The updateFoo and deleteFoo functions can be simplified further too, depending on their content.
Your request for reusable and maintainable code cannot be processed much further until further actual code is provided.
Dammit windows 10, I would like your to respond to my typing at a faster pace than just one character per second, if I may?? Background activity after starting your web browser and being lied to about its availability is a real hoot.