Archive for April, 2006

JavaScript is single-threaded

April 26, 2006

Damien Katz is mocking on an ONJava.com article that tries to implement Mutual Exclution for JavaScript.

I must say that I didn't really know it for sure that JavaScript is ALWAYS single-threaded, and there are never two threaded running in parallel. It is good to know that.

PS

After a long time of not blogging it, I noticed when I came back that WordPress.com has put back the Import options, so I imported my old Blogger blog into here.

Or-Assignment in JavaScript and Python

April 5, 2006

I just realized the other day that the || and && operators in JavaScript work like they work in Python, so you can write something like

var w = opener || window;

(Yes, I started learning Python for fun)