You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
В чем разница между: function Person(){}, var person = Person(), и var person = new Person()?
function Person(){} - Мы создаем функцию с именем Person. var person = Person() - Мы вызываем функцию Person и результат сохраняем в переменную person. var person = new Person() - Мы создаем новый объект, используя функцию-конструктор Person.