BVB Source Codes

prettier Show return-statement.js Source code

Return Download prettier: download return-statement.js Source code - Download prettier Source code - Type:.js
  1. function jsx() {
  2.   return (
  3.     // Comment
  4.     <div />
  5.   );
  6. }
  7.  
  8. function unary() {
  9.   return (
  10.     // Comment
  11.     !!x
  12.   );
  13. }
  14.  
  15. function numericLiteralNoParen() {
  16.   return 1337; // Comment
  17. }
  18.  
  19. function logical() {
  20.   return (
  21.     // Reason for 42
  22.     42
  23.   ) && 84
  24. }
  25.  
  26. function binary() {
  27.   return (
  28.     // Reason for 42
  29.     42
  30.   ) * 84
  31. }
  32.  
  33. function binaryInBinaryLeft() {
  34.   return (
  35.     // Reason for 42
  36.     42
  37.   ) * 84 + 2
  38. }
  39.  
  40. function binaryInBinaryRight() {
  41.   return (
  42.     // Reason for 42
  43.     42
  44.   ) + 84 * 2
  45. }
  46.  
  47. function conditional() {
  48.   return (
  49.     // Reason for 42
  50.     42
  51.   ) ? 1 : 2
  52. }
  53.  
  54. function binaryInConditional() {
  55.   return (
  56.     // Reason for 42
  57.     42
  58.   ) * 3 ? 1 : 2
  59. }
  60.  
  61. function call() {
  62.   return (
  63.     // Reason for a
  64.     a
  65.   )()
  66. }
  67.  
  68. function memberInside() {
  69.   return (
  70.     // Reason for a.b
  71.     a.b
  72.   ).c
  73. }
  74.  
  75. function memberOutside() {
  76.   return (
  77.     // Reason for a
  78.     a
  79.   ).b.c
  80. }
  81.  
  82. function memberInAndOutWithCalls() {
  83.   return (
  84.     // Reason for a
  85.     a.b()
  86.   ).c.d()
  87. }
  88.  
  89. function excessiveEverything() {
  90.   return (
  91.     // Reason for stuff
  92.     a.b() * 3 + 4 ? (a`hi`, 1) ? 1 : 1 : 1
  93.   )
  94. }
  95.  
  96. function sequenceExpression() {
  97.   return (
  98.     // Reason for a
  99.     a
  100.   ), b
  101. }
  102.  
  103. function sequenceExpressionInside() {
  104.   return ( // Reason for a
  105.     a, b
  106.   );
  107. }
  108.  
  109. function taggedTemplate() {
  110.   return (
  111.     // Reason for a
  112.     a
  113.   )`b`
  114. }
  115.  
  116. function inlineComment() {
  117.   return (
  118.     /* hi */ 42
  119.   ) || 42
  120. }
  121.  
downloadreturn-statement.js Source code - Download prettier Source code
Related Source Codes/Software:
storybook - 2017-06-07
ionicons - The premium icon font for Ionic ... 2017-06-07
AsyncDisplayKit - Smooth asynchronous user interfaces for iOS apps. ... 2017-06-07
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
parse-server - Parse-compatible API server module for Node/Expres... 2017-06-07
inferno - An extremely fast, React-like JavaScript library f... 2017-06-08
guetzli - Perceptual JPEG encoder 2017-06-08
cs-video-courses - List of Computer Science courses with video lectur... 2017-06-08
interviews - Everything you need to know to get the job. 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top