what is get function used for in javascript code example

Example 1: what is html used for

<!-- Answer to: "what is html used for" -->

<!--
  HTML is used to create electronic documents (called "pages")
  that are displayed on the World Wide Web.
-->

Example 2: how to use the this keyword in java

class Other{
    public double num;
    public Other(int num){
        this.num = num;
        System.out.println(num);
      	//print 5 to the console
    }
}

class scratch{
    public static void main(String[] args) {
        Other method = new Other(5);
        System.out.println(method.num);
      	//prints 5.0 to the console
    }
}