qtdeclarative/tests/manual/v4/switch.1.js

17 lines
297 B
JavaScript
Raw Normal View History

2012-05-29 08:20:28 +00:00
function test(a) {
switch (a) {
default: return "cool"
case "xxx": print("got zero"); break;
case "ciao": case "ciao2": return 123
case "hello": return 321
}
return 444
}
print(test("xxx"))
print(test("hello"))
print(test("ciao"))
print(test("ciao2"))
print(test(9))