do.js 735 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. const envSpecific = {
  2. domain:
  3. do {
  4. if(env === 'production') 'https://abc.mno.com/';
  5. else if(env === 'development') 'http://localhost:4000';
  6. }
  7. };
  8. let x = do {
  9. let tmp = f();
  10. tmp * tmp + 1
  11. };
  12. let x = do {
  13. if (foo()) { f() }
  14. else if (bar()) { g() }
  15. else { h() }
  16. };
  17. function foo() {
  18. return (
  19. <nav>
  20. <Home />
  21. {
  22. do {
  23. if (loggedIn) {
  24. <LogoutButton />
  25. } else {
  26. <LoginButton />
  27. }
  28. }
  29. }
  30. </nav>
  31. );
  32. }
  33. (do {});
  34. (do {} + 1);
  35. (1 + do {});
  36. () => do {};
  37. (do {
  38. switch(0) {
  39. case 0: "foo";
  40. case 1: break;
  41. }
  42. });
  43. () => do {
  44. var obj = { foo: "bar", bar: "foo" };
  45. for (var key in obj) {
  46. obj[key];
  47. }
  48. };