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?

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?

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/



Leave a Reply 1

Your email address will not be published. Required fields are marked *