Raffa, fiz um script pra trocar as peças do tabuleiro do Tornelo
Se quiser testar, cole no console do browser o codigo deste link. Depois crio a extensão que inverte o tabuleiro também. Até amanhã estará pronto.
| Essa comparação me retorna o que? | |
| `{} === {}` | |
| O que é hoisting? Poderia me explicar o retornaria no console.log? | |
| ```js | |
| function MyFunc() { | |
| console.log(x); | |
| let x = 'Front-End Test'; |
| function solution(N) { | |
| // write your code in JavaScript (Node.js 8.9.4) | |
| //100100001001 | |
| const binaryValue = N.toString(2); | |
| let start = false; | |
| let count = 0; | |
| let greater = 0; | |
| for (let i in binaryValue) { |
| $superheroes: c3po, luke, r2d2, anakin; | |
| @each $hero in $superheroes { | |
| .#{$hero} { | |
| background-image : url("#{$hero}.png"); | |
| } | |
| } | |
| $breakpoints: (sm: 375px, md: 768px, lg: 1200px); | |
| @each $size, $bp in $breakpoints { | |
| @media only screen and (min-width: $bp) { |
| // formValidations.js | |
| export const validateName = value => | |
| (value && value[0] === '@') ? true : false; | |
| export const validateSexo = value => | |
| (value !== '') ? true : false; | |
| export const validateAbout = value => | |
| (value.length > 50) ? true : false; |
| <div> | |
| <Field | |
| component={InputField} <!-- component to render --> | |
| type="text" <!-- InputField particular prop --> | |
| name="name" <!-- commom prop for all --> | |
| validate={validateName} <!-- callback function with value --> | |
| value={this.state.name.value} <!-- state value --> | |
| isValid={this.state.name.isValid} <!--state bool isValid --> | |
| onChange={::this.handleChange('name')} <!-- handleChange the state --> | |
| /> |
| // Textarea.js | |
| import React from 'react'; | |
| export const TextareaField = ({ | |
| value, | |
| name, | |
| style, | |
| onChange, | |
| }) => ( |
| // SelectField.js | |
| import React from 'react'; | |
| export const SelectField = ({ | |
| value, | |
| name, | |
| type, | |
| options, | |
| style, |