Function
Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure—a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.
Function Definition
A function definition (also called a function declaration) consists of the function keyword, followed by:
Get an HTML element by ID
document.getElementById(‘txt_name’);
Remove HTML element
element.remove();
Reload current page from cache
location.reload();
Reload current page from server
location.reload(true);