From 89bb7da4e9e803663ff682cb191ee8fa405b1ece Mon Sep 17 00:00:00 2001 From: Tandy-Nicole <84181728+Tandy-Nicole@users.noreply.github.com> Date: Thu, 12 Aug 2021 18:14:06 +0100 Subject: [PATCH 1/3] completed B-hello-world --- exercises/B-hello-world/exercise.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/B-hello-world/exercise.js b/exercises/B-hello-world/exercise.js index b179ee953..a744c8728 100644 --- a/exercises/B-hello-world/exercise.js +++ b/exercises/B-hello-world/exercise.js @@ -1 +1,3 @@ -console.log("Hello world"); +console.log(5); + + From 025e70f0c5d34c42e3bb4890a4c1bf76cc987927 Mon Sep 17 00:00:00 2001 From: Tandy-Nicole <84181728+Tandy-Nicole@users.noreply.github.com> Date: Thu, 12 Aug 2021 18:24:56 +0100 Subject: [PATCH 2/3] complete exercise/C --- exercises/C-variables/exercise.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/exercises/C-variables/exercise.js b/exercises/C-variables/exercise.js index a6bbb9786..b8e53893a 100644 --- a/exercises/C-variables/exercise.js +++ b/exercises/C-variables/exercise.js @@ -1,3 +1,10 @@ // Start by creating a variable `greeting` +var greeting = "Hello world"; + + +console.log(greeting); console.log(greeting); +console.log(greeting); + + From 39466988c3fb5b835cf2ae3168e11849f4bc77fa Mon Sep 17 00:00:00 2001 From: Tandy-Nicole <84181728+Tandy-Nicole@users.noreply.github.com> Date: Wed, 1 Sep 2021 20:20:24 +0100 Subject: [PATCH 3/3] completed exercise B, D and E --- .vscode/launch.json | 17 +++++++++++++++++ exercises/B-hello-world/README.md | 2 +- exercises/D-strings/exercise.js | 4 +++- exercises/E-strings-concatenation/exercise.js | 8 +++++++- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..eab977d61 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // 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": [ + { + "type": "pwa-node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${file}" + } + ] +} \ No newline at end of file diff --git a/exercises/B-hello-world/README.md b/exercises/B-hello-world/README.md index 8c704fb43..6965f8598 100644 --- a/exercises/B-hello-world/README.md +++ b/exercises/B-hello-world/README.md @@ -5,8 +5,8 @@ We'll do this in JavaScript, using something called `console.log()`. Inside of `exercise.js` there's a line of code that will print "Hello world!". ### 1. Run the program - - Open a terminal window + - Change directory to this folder (`cd B-hello-world`) - Run the program using node (`node exercise.js`) diff --git a/exercises/D-strings/exercise.js b/exercises/D-strings/exercise.js index 2cffa6a81..a7b5490dc 100644 --- a/exercises/D-strings/exercise.js +++ b/exercises/D-strings/exercise.js @@ -1,3 +1,5 @@ // Start by creating a variable `message` - +var message = "This is a string"; +var messageType = typeof message; console.log(message); +console.log(messageType); // logs 'string' \ No newline at end of file diff --git a/exercises/E-strings-concatenation/exercise.js b/exercises/E-strings-concatenation/exercise.js index 2cffa6a81..b654ccde8 100644 --- a/exercises/E-strings-concatenation/exercise.js +++ b/exercises/E-strings-concatenation/exercise.js @@ -1,3 +1,9 @@ // Start by creating a variable `message` -console.log(message); +var greetingStart = "Hello, my name is "; +var name = "Tandy''"; + +var greeting = greetingStart + name; + +console.log(greeting); // Logs "Hello, my name is Daniel" +