Procedural Knowledge
Procedural or imperative knowledge clarifies how to perform a certain task. It lays down the steps to perform. For example, - how to copy an array using javascript in a procedural way.
Example
var a=[1, 2, 3, 4, 5];
var b=[];
for(var i=0;i < a.length;i++) {
b.push(a[i]);
}
console.log(b);Output
[1, 2, 3, 4, 5]
Declarative Knowledge
Declarative or functional knowledge clarifies what to do to perform a certain task. It lays down the function to perform. For example, - how to copy an array using javascript in a declarative way.
Example
var a=[1, 2, 3, 4, 5];
var b=a.map(function(number){
return number*1
});
console.log(b);Output
[1, 2, 3, 4, 5]
The following are some of the important differences between Procedural Knowledge and Declarative Knowledge.
| Sr. No. | Key | Procedural Knowledge | Declarative Knowledge |
|---|---|---|---|
| 1 | Name | Procedural knowledge is also termed as imperative knowledge. | Declarative knowledge is also termed as functional knowledge |
| 2 | Basis | Procedural knowledge revolves around How to the concept. | Declarative knowledge revolves around What to the concept. |
| 3 | Communication | Procedural knowledge is difficult to communicate. | Declarative knowledge is easily communicable. |
| 4 | Orientation | Procedural knowledge is process-oriented. | Declarative knowledge is data-oriented. |
| 5 | Validation | Validation is not very easy in procedural knowledge. | Validation is quite easy in declarative knowledge. |
| 6 | Debugging | Debugging is not very easy in procedural knowledge. | Debugging is quite easy in declarative knowledge. |