-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
For a while python has a match-case statements When I ran the web version and tried to transpile this code to js:
# write your Python code...
print("hello world")
x = 1
match x:
case 1:
print("x is equal to 1")
case 2:
print("X is equal to 2")
if x == 1:
print("x = 1")
elif x == 2:
print("x = 2")It transpiles to:
console.log("hello world");
let x = 1;
if (x === 1) {
console.log("x = 1");
} else if (x === 2) {
console.log("x = 2");
} As you can see in the javascript code, there is nothing similiar to match case statements presented there, which could break some logic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
