scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
Beyond Function Declarations 2: Function Expression Challenge
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Beyond Function Declarations 2: Function Expression Challenge
AboutCommentsNotes
Beyond Function Declarations 2: Function Expression Challenge
Expand for more info
index.js
run
preview
console
/*
Challenge:
1. Convert this function declaration to a function expression.
*/

function getTheftAlert(numberOfTransactionsHour) {
if (numberOfTransactionsHour > 5) {
return `You have made ${numberOfTransactionsHour} transactions
in the past hour. We think your card might have been
compromised`
}
}

console.log(getTheftAlert(6))

Console
/index.html
-1:52