[JS] Using scope variable