class extends?

How it works and what it does, why use it?

in unity- javascript,

class Ability_ArcaneCannon extends Ability
{
  private var name : String = "Arcane Cannon";
	private var type : String = "Attack";
	var description : String = "\"Fires a small bolt of arcane energy, dealing moderate damage to one target.\"";
	private var tree : String = "Blasting"; // Use capital
  private var posInSkills : Vector2 = Vector2(1,0);
}

It’s called Inheritance “Inheritance (object-oriented programming) - Wikipedia

It inherits from the class “Ability” to use it’s public methods and values.

class A {
   var hitPoints : int;
}
class B extends A {
   var lives : int;
}

Basically, class B means this:

class B {
   var hitPoints : int;
   var lives : int;
}