This file contains hidden or 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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
This file contains hidden or 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
| numeros = [1, 2, 3] | |
| print(numeros) | |
| numeros.append(4) | |
| print(numeros) | |
| listaUno = ['a', 'b'] | |
| listaDos = ['x', 'y'] | |
| listas = [ listaUno, listaDos ] |
This file contains hidden or 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 currency = number => { | |
| return number.toLocaleString( | |
| "en", | |
| { | |
| style: "currency", | |
| currency: "USD", | |
| minimumFractionDigits: 2 | |
| } | |
| ); | |
| } |
This file contains hidden or 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
| import React from 'react'; | |
| import {products} from './products'; | |
| const ProductDetails = ({ name, match }) => { | |
| const { params: { productId }} = match; | |
| const product = products[productId]; | |
| return ( | |
| <div className="product-deatils"> |
This file contains hidden or 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
| import React from 'react'; | |
| import {products} from './products'; | |
| const ProductDetails = ({ name, productId }) => { | |
| const product = products[productId]; | |
| return ( | |
| <div className="product-deatils"> | |
| <h2>Product Details</h2> |
This file contains hidden or 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
| import React from 'react'; | |
| const ProductDetails = () => { | |
| return ( | |
| <div className="product-deatils"> | |
| <h2>Product Details works!</h2> | |
| </div> | |
| ) | |
| }; |
This file contains hidden or 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
| <ProductAlerts product={product} notify={onNotify} /> |
This file contains hidden or 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 onNotify = () => { | |
| window.alert('You will be notified when the product goes on sale'); | |
| } |
This file contains hidden or 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
| import React from 'react'; | |
| import {products} from './products'; | |
| const ProductAlerts = ({ product }) => { | |
| let productAlerts; | |
| if (product.price > 700) { | |
| productAlerts = <p><button>Notify Me</button></p>; | |
| } | |
NewerOlder