upas-web-site/page-js.html

92 lines
3.0 KiB
HTML
Raw Normal View History

2024-10-09 15:13:24 +04:00
<html lang="ru">
</html>
<head>
<meta charset="utf-8">
<title>Моя страница</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
<link rel="stylesheet" href="./css/style.css">
</head>
<body class="h-100 d-flex flex-column">
<header>
<nav class="navbar navbar-expand-md navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<i class="bi bi-app"></i>
Мой сайт
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse justify-content-end" id="navbarNav">
<div class="navbar-nav">
<a class="nav-link" href="./index.html">Главная страница</a>
<a class="nav-link" href="./page2.html">Вторая страница</a>
<a class="nav-link" href="./page3.html">Третья страница</a>
<a class="nav-link active" href="./page-js.html">JavaScript</a>
</div>
</div>
</div>
</nav>
</header>
<main class="container-fluid p-3">
</main>
<footer class="footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center">
Автор, 2022
</footer>
<script type="module">
function someFunc() {
return "world!";
}
const someFunc2 = function () {
return "asdasd";
}
const someFunc3 = () => "asdasd111";
const someFunc4 = (x, y) => x * y;
const TEST = `asdasd
asdasdasd
asdasdasd`;
const manufacturer = "lada";
const car = {
manufacturer,
speed: 10,
color: "red",
price: 1000.2,
print: () => `Color is`,
}
let x = "hello!";
console.log(x, someFunc(), someFunc2(), someFunc3(), someFunc4(3, 4));
x = 3;
console.log(`value is ${x} ${x * 2} price ${car.price}`, TEST, car, car.print());
let { speed, color, price } = car;
console.log(speed, color, price);
var arr = [1, 'asd', 'asd', false];
console.log(arr);
let arr1 = [1, 2, 3, 4];
let arr2 = ['a', 'b', 'c'];
let arr3 = [arr1, arr2];
console.log(arr3);
let func = (a, b, c, d) => a + b + c + d
console.log(func(...arr1))
</script>
</body>
</html>