有什么办法永久禁掉mobile站界面?只出桌面介面?# Joke - 肚皮舞运动
d*o
1 楼
要求写一个类,完成template string功能。具体如下:
var tmp = Template("{name} is a {if #isMale}man{/if}.")
tmp.format({name:'John', isMale:false})
这样就会输出 John is a man.
要实现的东西有3层:
1. Variable replacement
2. If statement
3. Nested if statement
var tmp = Template("{name} is a {if #isMale}man{/if}.")
tmp.format({name:'John', isMale:false})
这样就会输出 John is a man.
要实现的东西有3层:
1. Variable replacement
2. If statement
3. Nested if statement