You declared the variables with : whereas you need to use a =. The colon is only used within object declarations. You also did not end the line with a ; but with a ,. Variables a and b need a var in front of them. Otherwise, they will be globally accessible and that's exactly what you wouldn't want with the modular pattern.