From ea39e3d0c39a326eea621f55abafababd5d63ba4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 13 Jun 2023 23:41:18 +0300 Subject: [PATCH] docs... Signed-off-by: Alex A. Naanou --- js-types-n-oop.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js-types-n-oop.js b/js-types-n-oop.js index c59d78b..3e416a1 100755 --- a/js-types-n-oop.js +++ b/js-types-n-oop.js @@ -131,6 +131,14 @@ // Constructors +// +// A constructor is simply a function that "constructs" or populates an +// object. +// +// By convention constructor functions are capitalized (Pascal-case) +// +// Classic constructors are called with a "new" keyword which creates a +// bare instance and passes it to the function as the call context. // function A(){