From f5014c8c34c597be640285368dd5f140f10cbbdf Mon Sep 17 00:00:00 2001 From: TMajlu Date: Wed, 2 Oct 2024 15:44:50 +0200 Subject: [PATCH 1/3] Your commit message --- .eslintrc.js | 4 ++++ .idea/.gitignore | 3 +++ .idea/js-fundamentals-primitive-data-types.iml | 9 +++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ src/numbers.js | 12 ++++++------ src/strings.js | 8 ++++---- 8 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/js-fundamentals-primitive-data-types.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.eslintrc.js b/.eslintrc.js index 87d36ba..d47f72c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,3 +14,7 @@ module.exports = { 'prettier/prettier': ['error'] } } + +"rules": { + "no-unused-vars": "off" +} \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/js-fundamentals-primitive-data-types.iml b/.idea/js-fundamentals-primitive-data-types.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/js-fundamentals-primitive-data-types.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..6f29fee --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7d5cda2 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/numbers.js b/src/numbers.js index ee37fa1..f5e573e 100644 --- a/src/numbers.js +++ b/src/numbers.js @@ -12,22 +12,22 @@ const numThree = 32 // NOT myAnswer = 336 // 1. Set this variable to numOne added to numTwo -const numOnePlusNumTwo = NaN +const numOnePlusNumTwo = numOne + numTwo // 2. Set this variable to numThree multiplied by numTwo -const numThreeTimesNumTwo = NaN +const numThreeTimesNumTwo = numThree * numTwo // 3. Set this variable to numThree divided by numOne -const numThreeDividedByNumOne = NaN +const numThreeDividedByNumOne = numThree / numOne // 4. Set this variable to numThree minus numOne -const numThreeMinusNumOne = NaN +const numThreeMinusNumOne = numThree - numOne // 5. Set this variable to the sum of numOne, numTwo and numThree -const sum = NaN +const sum = numOne + numTwo + numThree // 6. Set this variable to the sum of (numOne, numTwo, numThree) divided by numOne -const numBytes = NaN +const numBytes = sum / numOne // do not edit the exported object. module.exports = { diff --git a/src/strings.js b/src/strings.js index a846086..ff4e1e8 100644 --- a/src/strings.js +++ b/src/strings.js @@ -13,16 +13,16 @@ const secondName = 'Smith' // NOT twoJanes = "JaneJane" // 1. Set this variable to firstName and secondName concatenated -const fullName = null +const fullName = firstName + ' ' + secondName // 2. Set this variable to the 10th character of the alphabet variable -const tenthCharacterOfAlphabet = null +const tenthCharacterOfAlphabet = alphabet[9] // 3. Set this variable by calling a method on the alphabet variable to transform it to lower case -const lowerCaseAlphabet = null +const lowerCaseAlphabet = alphabet.toLowerCase() // 4. Set this variable by using a property on the alphabet variable to get it's length -const numberOfLettersInAlphabet = null +const numberOfLettersInAlphabet = alphabet.length // do not edit the exported object. module.exports = { From 5e1c853bd141139c10f4c1da6b48e1d8d5306d12 Mon Sep 17 00:00:00 2001 From: TMajlu Date: Wed, 2 Oct 2024 15:47:18 +0200 Subject: [PATCH 2/3] Your commit message --- .eslintrc.js | 3 --- spec/advanced/strings-adv.spec.js | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d47f72c..9f0c23f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,6 +15,3 @@ module.exports = { } } -"rules": { - "no-unused-vars": "off" -} \ No newline at end of file diff --git a/spec/advanced/strings-adv.spec.js b/spec/advanced/strings-adv.spec.js index ad78633..8df581b 100644 --- a/spec/advanced/strings-adv.spec.js +++ b/spec/advanced/strings-adv.spec.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line no-unused-vars const { cityIndex, citySubstring, From 5dd4582e12e26dd364958ce7c158ca8a52b1657d Mon Sep 17 00:00:00 2001 From: Carlo M Date: Mon, 7 Oct 2024 15:27:47 +0200 Subject: [PATCH 3/3] Thomas Nielsen --- .husky/pre-commit | 4 ---- src/extensions/more-data-types.js | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index 6b54e0b..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx eslint src diff --git a/src/extensions/more-data-types.js b/src/extensions/more-data-types.js index 64cde7b..093a58b 100644 --- a/src/extensions/more-data-types.js +++ b/src/extensions/more-data-types.js @@ -1,22 +1,22 @@ // TODO: Replace the empty string in the lines below using Javascript with the correct data types // 1. Set this variable to be null -const nullVariable = '' +const nullVariable = null // 2. Set this variable to be true -const trueVariable = '' +const trueVariable = true // 2. Set this variable to be the opposite of the trueVariable (ie. false); -const falseVariable = '' +const falseVariable = false // 3. Set this variable to be undefined -const undefinedVariable = '' +const undefinedVariable = undefined // 4. get the typeof each of the above variables // hint you can use typeof variable to return a string of the variable type -const typeOfTrueVariable = '' -const typeOfFalseVariable = '' -const typeOfUndefinedVariable = '' +const typeOfTrueVariable = typeof trueVariable +const typeOfFalseVariable = typeof falseVariable +const typeOfUndefinedVariable = typeof undefinedVariable // do not edit the exported object. module.exports = {