Skip to content Skip to sidebar Skip to footer
Showing posts with the label Scope

In Ecmascript5, What's The Scope Of "use Strict"?

What scope does the strict mode pragma have in ECMAScript5? 'use strict'; I'd like to … Read more In Ecmascript5, What's The Scope Of "use Strict"?

Javascript Scope Of Function Declarations

The var keyword in javascript causes a variable to be stored in the local scope. Without var varia… Read more Javascript Scope Of Function Declarations

Very Strange Javascript Scoping Issue

The following variable my_cords is undefined when it gets to the google maps function, can anyone u… Read more Very Strange Javascript Scoping Issue

Strange Behavior On Global And Local Variable In Javascript

I tried following code: var a = 5; function x() { console.log(a); } x(); It runs as expected a… Read more Strange Behavior On Global And Local Variable In Javascript

How Can I *unpack* An Object Into A Function's Scope?

I have this code... function a(options) { for (var item in options) { if ( ! options.has… Read more How Can I *unpack* An Object Into A Function's Scope?

Accessing Variable Inside Object Property

So I encountered a problem. I have this object called myTree. And that object has properties. One o… Read more Accessing Variable Inside Object Property