Convert examples to plain javascript