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...
};
<!--[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"; // вот переменная