// Пусть this - [object MyObject]
function log() {
console.log(this);
};
var obj = new MyObject2();
obj.on("ready", () => log()); // [object MyObject];// Пусть this - [object MyObject]
function log() {
console.log(this);
};
var obj = new MyObject2();
obj.on("ready", log); // [object MyObject2]; $array1 = [
[0] => [
[ID] => 11111
[name] => ИМЯ
[photo] => Ссылка
]
[1] => [
[ID] => 22222
[name] => Другое Имя
[photo] => Другая ссылка
]
]$array1 = [
[
"ID" => 11111,
"name" => "ИМЯ",
"photo" => "Ссылка"
],
[
"ID" => 22222,
"name" => "Другое Имя",
"photo" => "Другая Ссылка"
]
]; main наслаивается на header, а footer на main. footer выше main, а main своим фоном закрашивает header. Без background-color фон прозрачный, и main просто не наслаивается ни на header, ни на footer. not submitedsubmitedcancelednothingsubmitedcheckedsubmited and checkedis_submited и is_checked.Something | Right column
Something else | OtherThe <section> element defines a section in a document.<section> обозначает секцию.
According to W3C's HTML5 documentation: "A section is a thematic grouping of content, typically with a heading."
A home page could normally be split into sections for introduction, content, and contact information.
The <article> element specifies independent, self-contained content.Элемент <article> обозначает независимый элемент.
An article should make sense on its own, and it should be possible to read it independently from the rest of the web site.
Examples of where an <article> element can be used:
Forum post
Blog post
Newspaper article
The <main> tag specifies the main content of a document.Тег <main> обозначает главный контент документа.
The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.
getRandom() вызывается несколько раз, и все время значение разное.getRandom() < 0.5 || getRandom() >= 0.5. Первый вызов даст, например, 0.6, а второй, например, 0.4.function getRandom() {
return Math.random();
}
function random() {
var rand = getRandom();
if (rand < 0.25) {
$('.element-1').addClass('active');
} else if (rand > 0.25 && rand < 0.5) {
$('.element-2').addClass('active');
} else if (rand > 0.5 && rand < 0.75) {
$('.element-3').addClass('active');
} else () {
$('.element-4').addClass('active');
}
}<a>
<b></b>
</a>
<c></c>a ~ c {} /* находит */
b ~ c {} /* не находит */<a></a>
<b></b>
<c></c>a + b {} /* работает */
b + c {} /* работает */
a + c {} /* не работает */