It’s not enough to preach teaching kids how to code — today U.S. President Barack Obama took his turn at the keyboard to do a few exercises and learn how to write a line of JavaScript, too.

Obama became the first U.S. president to write a computer program as part of a White House-sponsored “Hour of Code” event. This is the second year Code.Org has organized a campaign to teach kids (and government leaders) worldwide the fundamentals of programming. Across the Atlantic, U.K. Prime Minister David Cameron also spent an hour of code learning with young students in Britain.
