Framework for defining and verifying example JavaScript functions