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
+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>