var test = new Test;
function Test2() {}
Test2.prototype.method1 = function(first_argument) {
// Вызов
test.method1();
};
function Test() {
this.field1 = 'field1';
this.field2 = 'field2';
}
Test.method1 = function(first_argument) {
// do something...
};
<div class="type-of-work__item">
<a href="#" class="type-of-work__link">Контрольная работа</a>
<div class="type-of-work__meta">
<div class="type-of-work__meta-item">от 300 грн.</div>
<div class="type-of-work__meta-item">от 2 дней</div>
</div>
</div>
<!--[if !IE 8]><!-->
<script type="text/javascript" charset="utf-8" src="//api-maps.yandex.ru/services/constructor/1.0/js/?sid=WcrZ7ic6V23Ummldw0a9mbCObyfKl3Bi&width=600&height=450"></script>
<!--<![endif]-->
var myvar;
window.map.on('draw:created', function (e) {
var type = e.layerType,
layer = e.layer;
if (type === 'marker') {
// Do marker specific actions
}
myvar = "foo"; // вот переменная
return (
<input type="button" onClick={ this.handleClick.bind(this, objectTest) } />
);
window.addEventListener('DOMContentLoaded', () => {
//...
});