Skip to content

Instantly share code, notes, and snippets.

@sewerynkalemba
Created December 3, 2020 17:17
Show Gist options
  • Save sewerynkalemba/484018086477854f2be2d05cb92b30a9 to your computer and use it in GitHub Desktop.
Save sewerynkalemba/484018086477854f2be2d05cb92b30a9 to your computer and use it in GitHub Desktop.
const getFive = () => 5
const addFive = a => a + 5
const divide = (a, b) => a / b
// to jest to samo, co:
function getFive() {
return 5
}
function addFive(a) {
return a + 5
}
function divide(a, b) {
return a / b
}
// w Reactcie:
function TeddyBearList({teddyBears}) {
return (
<ul>
{teddyBears.map(teddyBear => (
<li key={teddyBear.id}>
<span>{teddyBear.name}</span>
</li>
))}
</ul>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment