How to switch variable value in JavaScript

welcome to shbcf.ru