Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bjørg Kristiansen #282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/advanced/swap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ let a = 8
let b = 10

// TODO: Swap the values of a and b without changing lines 1 and 2; extra points if you can do it without using a temporary variable

b = [a, (a = b)][0]
module.exports = { a, b }
3 changes: 2 additions & 1 deletion src/assignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ let firstNumber = 10
firstNumber = 0

// TODO: 1. Set the value of firstNumber below so the tests pass
firstNumber = 20

// TODO: 2. Change the code below so that the tests pass
const secondNumber = 0 // edit this value
const secondNumber = 42 // edit this value

// do not edit the exported object.
module.exports = {
Expand Down
3 changes: 2 additions & 1 deletion src/declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
//
//
// TODO: 1. Declare the variables firstName and age so that the tests pass

const firstName = 'Jane'
const age = 35
// do not edit below this line
let firstNameExport = ''
try {
Expand Down
20 changes: 10 additions & 10 deletions src/extensions/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,34 @@ function pick(n) {
}

// 1. Pick true using the pick function - by changing 0 to pick your answer
const imTrue = pick(0)
const imTrue = pick(9)

// 2. Pick a real number
const aReal = pick(0)
const aReal = pick(4)

// 3. Pick a string
const aString = pick(3)
const aString = pick(6)

// 4. Pick an array
const anArray = pick(1)
const anArray = pick(7)

// 5. Pick a (simple) number
const aNumber = pick(0)
const aNumber = pick(3)

// 6. Pick an object
const anObject = pick(1)
const anObject = pick(8)

// 7. Pick false
const imFalse = pick(0)
const imFalse = pick(10)

// 8. Pick a BigInt
const imBigInt = pick(1)
const imBigInt = pick(5)

// 9. Pick undefined
const imUndefined = pick(0)
const imUndefined = pick(2)

// 10. Pick null
const imNull = pick(0)
const imNull = pick(1)

// Do not edit below this line
module.exports = {
Expand Down
Loading