سلام. وقتی که تعریف یک تابع رو به صورت کامل داخل یک شرط قرار بدیم چه تفاوتی داره که از ساختار دوم با Arrow Function استفاده کنیم؟
if(currentUser) {
function test() {
console.log('Nope.');
}
}
let test;
if(currentUser) {
test = () => {
console.log('Yup.');
}
}