Use a Mixin to Add Common Behavior Between Unrelated Objects - Why?

Tell us what’s happening:
I want to understand more about the definition of Mixin. Why is it necessary to write the property as a function instead of just a return or console.log(“Flying, woosh!”)? It basically does the same thing that puts this property into the subtypes. Does it not make the GlideMixin function as a mixin?

Your code so far

let bird = {
  name: "Donald",
  numLegs: 2

let boat = {
  name: "Warrior",
  type: "race-boat"

// Add your code below this line

let glideMixin = function(jj) {
    jj.glide = function() {
        console.log ("im gliding");



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36.

Link to the challenge: