JSFiddle - React, Tailwind, and code Playground

by Vasilii Chugunov

HTML

<div id="first">
  Первый
</div>

JavaScript

var first = document.getElementById('first');
alert (typeof first);


var counter = function() {
	var i = 0;
  return function() {
  	i++;
    alert(i);
  }
}

alert(i);

var myCounter = counter();
myCounter();
myCounter();

/*
var Man = function(name, age) {
	var me = this;
  this.name = name;
  this.age = age;

  this.sayHi = function() {
    alert("Привет, я " + this.name + " мне " + this.age + " годков");
  }
}

var human = new Man("Сергей", 29);
human.sayHi();

human.sayBue = function() {
	alert('Bye!');
}

human.sayBue();
*/

/*
var a = 24;
var b = typeof a; // 'number'
alert(typeof b);
var c = {
  name: 'Dmitrii',
  age: 48,
  hands: [
    'left', 'right'
  ],
  sayHi: function(name) {
  	alert(name + 'Hi!')
  }
};
c['name'];

var name = 'Vitaly';
c.sayHi(name);
*/