Home
Public posts
API
Home
Public posts
API
Sign in with GitHub
1
function switchValues(n)
2
{
3
return 3 - n;
4
}
5
console.log(switchValues(1)); // 2
6
console.log(switchValues(2)); // 1
Auto run
Auto clear
Run
Click Run to execute JavaScript.
Code runs in an isolated environment.