Mistři v programování na #hovnokod

JavaScript #4517

// 1.
const RatingTag = (value) => {
  var color = "blue"
  switch(true) {
    case 5 === value:
      color = 'blue'
      break;
    case 4 <= value:
      color = "green";
      break;
    case 3 <= value:
      color = 'red';
  }
}

// GG
ratingTag('5');


// 2.  - JSX (react component)
const label = () => {
  return (
<div>
text => <label text={text}>
</label>
</div>
)
}
// WP - extra money for each commited line


// 3. webpack.config.js

entry: "./src/index.js",
output: {
    path: __dirname + "/src",
    filename: "bundle.js"
  }

Anonymous,