程序知识:
程序性知识也称为解释性知识,是一种知识类型,它阐明了如何完成特定的事情。它不是那么受欢迎,因为它通常不被使用。
它强调如何做某事来解决给定的问题。
让我们看一个例子:
var a=[1, 2, 3, 4, 5];
var b=[];
for(var i=0;i
输出是:
[1, 2, 3, 4, 5]
陈述性知识:
陈述性知识也称为描述性知识,是一种知识类型,它讲述关于某事的基本知识,比程序性知识更受欢迎。
它强调做什么来解决给定的问题。
让我们看一个例子:
var a=[1, 2, 3, 4, 5];
var b=a.map(function(number)
{
return number*1});
console.log(b);
输出是:
[1, 2, 3, 4, 5]
在这两个示例中,我们可以看到给定问题的输出是相同的,因为这两种实现问题输出或解决方案的方法的唯一区别。
区别程序性知识和陈述性知识:
S.NO | Procedural Knowledge | Declarative Knowledge |
---|---|---|
1. | It is also known as Interpretive knowledge. | It is also known as Descriptive knowledge. |
2. | Procedural Knowledge means how a particular thing can be accomplished. | While Declarative Knowledge means basic knowledge about something. |
3. | Procedural Knowledge is generally not used means it is not more popular. | Declarative Knowledge is more popular. |
4. | Procedural Knowledge can’t be easily communicate. | Declarative Knowledge can be easily communicate. |
5. | Procedural Knowledge is generally process oriented in nature. | Declarative Knowledge is data oriented in nature. |
6. | In Procedural Knowledge debugging and validation is not easy. | In Declarative Knowledge debugging and validation is easy. |
7. | Procedural Knowledge is less effective in competitive programming. | Declarative Knowledge is more effective in competitive programming. |