Fix anonymous function snippet to match Google JS style guides