Interesting behavior. Always fun to learn what happens in the compiler, even if it's unlikely to be of use in most applications
@DavidMares-dc3yk Жыл бұрын
Hello Teddy, one question. Do you have a learning rutine? how do you learn new concepts?
@TeddySmithDev Жыл бұрын
Basically, I find examples online and apply things that are relevant to me. So if I'm following a tutorial on React, instead of building a todo list, I will make it a running list.
@DavidMares-dc3yk Жыл бұрын
@@TeddySmithDev Oh ok thank you. So learning things that you can actually apply to you. that makes sense. For example, i learned about middlewares in .NET 6 web api because i did not want to get the error log in swagger and then after some research i found this.. public async Task InvokeAsync(HttpContext context, RequestDelegate next) { try { await next(context); } catch (Exception e) { _logger.LogError(e, e.Message); await HandleExceptionAsync(context, e); } }
@s3v3n-rb2rz5 ай бұрын
should we always use function expression so that hoisting doesn't happen?
@TeddySmithDev5 ай бұрын
it kinda depends. I would use arrow functions mostly, but you can have scoping issues with arrow functions too. Very situational.