diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b2846d8 --- /dev/null +++ b/.vscode/launch.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/5/javaScriptTester.html b/5/javaScriptTester.html deleted file mode 100644 index 0fc4f37..0000000 --- a/5/javaScriptTester.html +++ /dev/null @@ -1,6 +0,0 @@ - - - This goes in the tab of your browser - - - \ No newline at end of file diff --git a/6/6,2.js b/6/6,2.js new file mode 100644 index 0000000..4e0c097 --- /dev/null +++ b/6/6,2.js @@ -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(); \ No newline at end of file diff --git a/6/javaScriptTester.html b/6/javaScriptTester.html new file mode 100644 index 0000000..beae4e8 --- /dev/null +++ b/6/javaScriptTester.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file