Comment

Comment by borplk

Second example, "function scope"

"Based on knowledge of several other languages (such as Java or C), this would certainly be true. However, Javascript doesn't change scope when entering if statements, loops, or anything like that, really."

Dude what the hell?

In Java and C, 'if' blocks don't have their own isolated scope either. The equivalent Java or C code would also work perfectly fine.

parent borplk 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton