From e5df03626e61ba595203761c7ef7ea1a304688f5 Mon Sep 17 00:00:00 2001 From: Mark Thiongo Date: Sun, 8 Dec 2024 13:10:32 +0300 Subject: [PATCH] Completed lab tasks and passed all tests --- .babelrc | 4 ++++ index.js | 11 +++++++++++ package.json | 14 ++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 000000000..3e53af2e6 --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["@babel/preset-env"] + } + \ No newline at end of file diff --git a/index.js b/index.js index 96427a583..8a1d667cf 100644 --- a/index.js +++ b/index.js @@ -1 +1,12 @@ // Write your code in this file! +// Define the currentUser variable +const currentUser = 'Grace Hopper'; + +// Define the welcomeMessage variable, concatenating strings +const welcomeMessage = 'Welcome to Flatbook, ' + currentUser; + +// Define the excitedWelcomeMessage variable, converting the welcomeMessage to uppercase +const excitedWelcomeMessage = welcomeMessage.toUpperCase(); + +// Define the shortGreeting variable, using only the first letter of currentUser +const shortGreeting = `Welcome, ${currentUser.slice(0, 1)}!`; diff --git a/package.json b/package.json index 2d4342e4f..690206b36 100644 --- a/package.json +++ b/package.json @@ -24,14 +24,16 @@ }, "homepage": "https://github.com/learn-co-curriculum/js-basics-strings-code-along#readme", "devDependencies": { - "babel-core": "6.26.3", - "babel-preset-env": "1.7.0", + "@babel/core": "^7.26.0", + "@babel/preset-env": "^7.26.0", + "babel-core": "^5.8.38", + "babel-preset-env": "^0.0.0", "chai": "4.1.2", - "jsdom": "9.2.1", - "mocha": "5.2.0", + "chai-spies-next": "^0.9.3", + "jsdom": "^25.0.1", + "mocha": "^11.0.1", "mocha-jsdom": "~1.1.0", - "mocha-multi": "1.0.1", - "chai-spies-next": "^0.9.3" + "mocha-multi": "^1.1.7" }, "dependencies": { "sinon": "^7.3.2"