scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
Short-circuiting with AND (&&) 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

Short-circuiting with AND (&&) Challenge
AboutCommentsNotes
Short-circuiting with AND (&&) Challenge
Expand for more info
index.js
run
preview
console
const accountBalanceUsd = '$45,000,000,000 🤑💰'
const swissBankPassCodesArr = [1234,5678,9876,3434]

function authenticationCheck(passCode){
/*
Challenge:
1. If the passcode passed into authenticationCheck
exists in swissBankPassCodesArr, authenticationCheck
should log out accountBalanceUsd.

If the passcode does not exist in swissBankPassCodesArr
then authenticationCheck need not do anything.

⚠️ Make sure you short-circuit with &&
hint.md for help!
*/
}

authenticationCheck(3434)
Console
"Hi Admin!"
,
/index.html
-4:10