Imperative vs. Declarative Javascript

preview_player
Показать описание

--

Imperative vs. declarative code is easier to understand than you think! Imperative focuses on the "how" whereas declarative abstracts the "how" away and focuses on the "what." Here are two versions of the same lessThan10Filter: one imperative and one declarative.
Рекомендации по теме
Комментарии
Автор

Imperative = some function I wrote, Declarative = call some function someone else wrote...got it!

sawilliams
Автор

So it's really just a layer of abstraction that defers the responsibility of the 'how' to another entity, in this case to the JS engine's implementation of filter, which itself may be a mixture of imperative and declarative programming.

jamesteow
Автор

Thank you for brief explanation about it !

justindglee
Автор

hm, why invent hard to memorize words

Konstantin
visit shbcf.ru