nerdexam
Adobe

9A0-127 · Question #59

What is the correct syntax for a CFC function declared within a <cfscript> block that always returns a structure and throws a runtime error if the incorrect type is returned?

The correct answer is A. function myFunction() returntype="struct" { return structNew(); }. See the full explanation below for the reasoning.

Question

What is the correct syntax for a CFC function declared within a <cfscript> block that always returns a structure and throws a runtime error if the incorrect type is returned?

Options

  • Afunction myFunction() returntype="struct" { return structNew(); }
  • Bfunction myFunct():struct { return structNew(); }
  • Cfunction struct myFunction() { return structNew(); }
  • Dfunction myFunction() { return structNew(); }

How the community answered

(44 responses)
  • A
    84% (37)
  • B
    5% (2)
  • C
    2% (1)
  • D
    9% (4)

Community Discussion

No community discussion yet for this question.

Full 9A0-127 Practice