Instantly share code, notes, and snippets.

View main.php
<?php
echo "-------------------------------задание 1--------------------------\n";
$authors =
[
["name" => "ivan ivanov",
"email" => "ivan@mail.hell",
"birthday" => "1888",
"books" => [
View main.php
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
View main.php
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
View main.php
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
View Functions.js
'use strict'
//1
function guarantee(yearsGuarantee) {
yearsGuarantee = yearsGuarantee === undefined ? 0 : yearsGuarantee;
if (yearsGuarantee === 1) {
return console.log(`гарантийное обслуживание на ${yearsGuarantee} год будет стоить 1250 Q`);
}
View Homework 1.7 Objects.js
'use strict'
var positions = [
'Телепорт бытовой VZHIH-101',
'Отвертка ультразвуковая WHO-D',
'Ховерборд Mattel 2016',
'Нейтрализатор FLASH black edition',
'Меч световой FORCE (синий луч)'
];
View Homework 1.5.js
'use strict'
// 1
var price;
var taxes = 0;
function update_taxes(offerPrice) {
let taxe = 0.73 * offerPrice;
taxes += taxe;
return console.log(`Налог с продажи 73 % к оплате ${taxes} Q`)
};
View ControlStructures.js
'use strict'
// 1
var quantityInStock;
var quantityOfGoodsInTheOrder;
quantityInStock = 500;
quantityOfGoodsInTheOrder = 500;
if (quantityOfGoodsInTheOrder > quantityInStock) {
console.log('На складе нет такого количества товаров')
View CyclesAndArrays.js
'use strict'
// 1
var positions = [
'Отвертка ультразвуковая WHO-D',
'Ховерборд Mattel 2016',
'Нейтрализатор FLASH black edition',
'Меч световой FORCE (синий луч)',
'Машина времени DeLorean',
'Репликатор домашний STAR-94',
'Лингвенсор 000-17',
View ControlStructures.js
'use strict'
// 1
var quantityInStock;
var quantityOfGoodsInTheOrder;
quantityInStock = 500;
quantityOfGoodsInTheOrder = 500;
if (quantityOfGoodsInTheOrder > quantityInStock) {
console.log('На складе нет такого количества товаров')