This is not true. However, you should keep in mind that they may not behave as you might expect.
For example, this will work:
if( false) {
function double(a) {return a*2;};
}
else {
console.log(double(4));
}
, - , if, , "" ( <script> ) .
function if, , .