Created
December 3, 2020 17:17
-
-
Save sewerynkalemba/484018086477854f2be2d05cb92b30a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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