I define the object as follows:
function Project(Attributes, ProjectWidth, ProjectHeight) { this.ProjectHeight = ProjectHeight; this.ProjectWidth = ProjectWidth; this.ProjectScale = this.GetProjectScale(); this.Attributes = Attributes; this.currentLayout = ''; this.CreateLayoutArray = function() {....} }
Then I try to create an instance, for example:
var newProj = new Project(a,b,c);
But this is an exception:
Project is not a constructor
What could be wrong? I walked a lot, but still can not understand what I'm doing wrong.
javascript object constructor typeerror
unni Apr 11 2018-12-12T00: 00Z
source share