6,2.js version 1

This commit is contained in:
2026-05-05 19:15:01 +03:00
parent 6b779346c1
commit fcccb35138
4 changed files with 37 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Open javaScriptTester.html",
"file": "c:\\Users\\Dream\\JavaScript\\6\\javaScriptTester.html"
}
]
}
-6
View File
@@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<head> <title>This goes in the tab of your browser</title></head>
<body>
<script type="text/javascript" src="5,2.js"></script>
</body>
+10
View File
@@ -0,0 +1,10 @@
const adj = ["крутой(-ая)", "красивый(-ая)", "плохой(-ая)", "злой(-ая)", "весёлый(-ая)", "осторожный(-ая)", "серьёзный(-ая)", "надменный(-ая)"];
function adjForName() {
const uName = prompt("Как тебя зовут?");
const indexAdj = Math.floor(Math.random() * 5);
alert(uName + " - " + adj[indexAdj]);
console.log(uName + " - " + adj[indexAdj]);
}
adjForName();
+6
View File
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<head> <meta charset="UTF-8"> </head>
<body>
<script type="text/javascript" src="6,2.js"> </script>
</body>