Skip to content

Instantly share code, notes, and snippets.

@alexdevero
Created March 27, 2018 13:13
Show Gist options
  • Save alexdevero/1940834f2e148c8802601747d36775ac to your computer and use it in GitHub Desktop.
Save alexdevero/1940834f2e148c8802601747d36775ac to your computer and use it in GitHub Desktop.
Will you succeed?
const willSucceed =() => {
const mindset = [
['ambition', true],
['confidence', true],
['courage', true],
['creativity', true],
['determination', true],
['discipline', true],
['grit', true],
['persistence', true],
['patience', true],
['resilience', true]
]
let success
for(let i = 0, j = mindset.length; i<j; i++) {
if (!mindset[i][1]) {
success = false
break
}
success = true
}
console.log(success)
return success
}
willSucceed()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment