Which programming language element is a block of code that can be reused multiple times to execute a specific task?

IT Exam Items Repository › Category: Ethical Hacker › Which programming language element is a block of code that can be reused multiple times to execute a specific task?

Which programming language element is a block of code that can be reused multiple times to execute a specific task?

  • Function
  • JavaScript Object Notation (JSON)
  • Array
  • Class

Explanation: A function is a block of code useful when executing similar tasks regularly throughout a program.

Related exam: 10.3.3 Quiz - Tools and Code Analysis Answers