PrepAway - Latest Free Exam Questions & Answers

Which code segment should you insert at line 05?

You are creating a custom object as described by the following code. Line numbers are included for reference
only.

You need to implement the perimeter method.
Which code segment should you insert at line 05?

PrepAway - Latest Free Exam Questions & Answers

A.
function perimeter () {return 4 * side;}

B.
function perimeter () {return 4 * this.side;}

C.
function perimeter () {return 4 * me.side;}

D.
function perimeter (obj) {return 4 * obj.side;}

Explanation:
http://creative-coding.decontextualize.com/objects-with-methods/

One Comment on “Which code segment should you insert at line 05?


Leave a Reply