JSFiddle - React, Tailwind, and code Playground
HTML
<p>
Решение задачи не принимает мотивируя :
<br>
should not overwrite existing objects in the namespace
Value is not what was expected <br>
should not replace the existing namespace object
Value is not what was expected</p>
JavaScript
var MyNamespace = {
MyClass : function(param) {
this.param = param;
}
}
MyNamespace.MyClass.prototype.sayHello = function(param) {
return this.param;
}
var myObject = new MyNamespace.MyClass('Hello');
var phrase = myObject.sayHello();