can be functions

Methods can use other object properties using the keyword this.

var student = {
        'firstName': 'Marie',
        'lastName': 'Smith',
        'fullName': function() {
            return this.firstName + ' ' + this.lastName;
        }
    }

    console.log( student.fullName() ); // The console will show 'Marie Smith'

Important:

everything in Javascript is an object

console.log('Hello World'); // log is a method of the console object 

    Math.round(2.7);  // round is a method of the Math object

    var num = 3; 
    var num_string = num.toString(); // toString is a method that can be applied to different data types.

    document.getElementById("caixa_azul").innerHTML;  // getElementById is a method of the document object.
    // innerHTML is a property of the object returned by the get method.

    var courses = [ "HTML", "Python", "PHP" ];
    courses.push("Javascript"); // push is a method of the array data type.

<aside> 🤟🏾 you can learn more here.

</aside>