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
| body { | |
| font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
| } | |
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
| Last login: Tue Sep 4 10:29:52 on ttys000 | |
| ✝ ~ ls | |
| Applications | |
| Background images | |
| Bases de données | |
| Boostnote | |
| Desktop | |
| Documents | |
| Downloads | |
| Dropbox |
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
| function boucle(x) { | |
| if (x >= 0) { | |
| console.log(x); | |
| boucle(x-1); | |
| } | |
| } | |
| boucle(10); |
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
| function multiply(x,y) { | |
| if (y < 0) { | |
| y = -y; | |
| x = -x; | |
| } | |
| if (y > 0) { | |
| return x +multiply(x,y-1) | |
| }else { | |
| return 0 | |
| } |
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
| function opposite(number) { | |
| return number *- 1 | |
| } | |
| console.log(opposite(-14)); | |
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 getCount = (str) => { | |
| let consonne = 0 | |
| let vowelsCount = 0; | |
| const letter = str.split('') | |
| let voyelles = ["a", "o", "i", "e", "u"]; | |
| letter.map((letter) => { | |
| voyelles.includes(letter) ? vowelsCount += 1 : consonne+=1 | |
| }) | |
| return `${vowelsCount} voyelles et ${consonne} consone`; | |
| } |
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, { Component } from 'react' | |
| const arr = [12,23,56] | |
| class DisplayPokemon extends Component { | |
| state = { | |
| data:[] | |
| } | |
| //!Lance la function au demarrage | |
| componentDidMount() { | |
| this.fetchData() |
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, { Component } from 'react'; | |
| import './App.css'; | |
| class App extends Component { | |
| state = { | |
| nom:"", | |
| email:"" | |
| }; | |
| handleSubmit = () => { |
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
| retrieveData = async () => { | |
| // config url | |
| const url =""; | |
| const data = await axios.get(`${url}`); | |
| console.log(data); | |
| }; | |
| componentDidMount() { | |
| this.retrieveData(); |
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
| function lettreCapitalize(str) { | |
| const arr = str.split(" "); | |
| const arrCapitalize = arr.map(str => str.charAt(0).toUpperCase() + str.slice(1)); | |
| return arrCapitalize.join(" ") | |
| } |