Create switctInJavaScript