This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let i = true; | |
let j = 14; | |
ans = i ? (j > 10 ? (j%7 === 7 ? 14 : 54 ) : 66) : 99; | |
// returns 14 because i === true && j > 10 && j%7 === 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To bind a dependency to some class in laravel | |
$this->app->bind(‘App\Helpers\Stripe’, function($app){ | |
$api_key = config(‘services.stripe.api_key’); | |
return new \App\Helpers\Stripe($api_key); | |
}); |
NewerOlder