Scheme, Lisp, ML: yes. I'd written sizable programs in each of those, I'd worked on rewriting a programming languages course textbook with a professor in college, and I'd studied On Lisp. One of the initial test cases was Paul Graham's accumulator generator: https://github.com/golang/go/blob/0f4f2a6/test/closure.go
Javascript: no. At that time (Feb 2009) I doubt I even knew Javascript had lexically-scoped closures. I know I didn't buy 'Javascript: The Good Parts' until March 2010. Even today I don't think the fact that Javascript got closures right is particularly remarkable, except that, as Crockford demonstrates, that fact serves as the fundamental saving grace that enables forgiveness of many other problems.
Aside from literally only (pre-Common and Emacs) Lisp, I can't think of any language without lexical scope (outside some constructs etc).
[edit:] Or are you thinking of "only a single global namespace"? Even that exists only in otherwise highly restricted scripting languages, I think? ("Everything global" is technically lexical, but I see why you wouldn't want to call it that.)
Global is just a flat namespace. Functions have their own, separate flat namespace each. I tried the following in a REPL:
function two() { echo $a; }
function one() { $a = 1; two(); }
one();
as the standard dynamic scope example, and I get an "undefined variable" error. Did that use to be dynamic? (I wouldn't be surprised, though, especially given PHP's implementation history...)
There is an explicit "static" modifier that looks dynamic, but I couldn't get it to run that way. It seems to just retain state in recursive calls of the same function, or something?
[edit:] (And PHP doesn't predate Javascript, but regardless, "no first-class functions" isn't "no lexical scope".)
I don't think this comment deserves the downvotes. JS deserves a lot of credit for doing scoping right in 1995, at a time when most popular languages (i.e. not Lisp or ML) were doing it wrong. (A notable exception was Perl 5, which did scoping right in 1994.) Thanks to JS, a lot of working programmers who would never be exposed to Lisp learned lexical scope. Remember that Emacs Lisp famously chose dynamic scope over lexical scope (a serious blunder) due to RMS's belief that lexical scope couldn't possibly be implemented in a performant way!