Pipeline-as-a-code is a technique or set of features that help you maintain the CI/CD workflow logic in the source code repository without any additional configurations for each Jenkins branch. This is applicable for projects that have a file named as Jenkinsfile in the root folder of the repo (containing a pipeline script). The types of pipeline syntax are declarative and syntax.
Declarative: These provide an easy way for creating pipelines and has a predefined hierarchy to create Jenkins pipelines. You can control all the aspects of the Pipeline.
Scripted: It runs on the Jenkins master through a lightweight executor and uses few resources for translating the Pipeline into code (commands).