Object Methods
Object Methods
A method is a function stored on an object. When a method needs other properties from the same object, this refers to that object during the method call.
Your task: Add a describe method to course. It should return a description using the course title and level. Store the method result in courseDescription, then log it.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Object Methods
A method is a function stored on an object. When a method needs other properties from the same object, this refers to that object during the method call.
Your task: Add a describe method to course. It should return a description using the course title and level. Store the method result in courseDescription, then log it.