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 logo from './logo.svg'; | |
| import './App.css'; | |
| import Quote from "./Quote"; | |
| import Lamp from "./Lamp"; | |
| import Newlogo from "./Newlogo"; | |
| class App extends Component { | |
| constructor(props) { |
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
| .App { | |
| text-align: center; | |
| } | |
| .App-logo { | |
| animation: App-logo-spin infinite 20s linear; | |
| height: 40vmin; | |
| pointer-events: none; | |
| } |
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 express = require('express'); | |
| const app = express(); | |
| const port = 3000; | |
| app.get('/', (request, response) => { | |
| response.send('Bienvenue sur Express'); | |
| }); | |
| app.get('/api/movies', (req, res) => { | |
| res.send('Recuperation de tous les films') | |
| }); |
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 http = require("http"); | |
| const port = 3000; | |
| const requestHandler = (request, response) => { | |
| let arrUrl = request.url.split("/"); | |
| console.log(arrUrl); | |
| console.log("je suis request.url " + request.url); | |
| if (request.url === "/") { | |
| response.end("Bienvenue sur votre serveur !!"); | |
| } else if (request.url === "/contact") { |
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
| let cowsay = require("cowsay"); | |
| console.log( | |
| cowsay.say({ | |
| text: "hello boy" | |
| }) | |
| ); |
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
| process.stdin.resume(); | |
| process.stdin.setEncoding("utf8"); | |
| console.log("What's your age ? "); | |
| process.stdin.on("data", age => { | |
| if (typeof Number(age) === "number" && age < 99 && age > 0) { | |
| console.log("You were born in " + (2019 - Number(age))); | |
| } else if (age < 0) { | |
| console.log("Wrong format"); | |
| } |
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
| class BankCustomer { | |
| constructor(name, privatePin) { | |
| let customersName = name; | |
| let customersPin = privatePin; | |
| this.getName = () => customersName; | |
| this.verifyPinInput = privatePin => { | |
| if (privatePin == customersPin) { | |
| return true; |
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
| class Person { | |
| constructor(name, age) { | |
| this.name = name; | |
| this.age = age; | |
| } | |
| tellMyName() { | |
| return `I am ${this.name}`; | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <script src="script.js"></script> | |
| </head> | |
| <body> |
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
| let myArr = ['Hannah', 'Guilhem', 'Louis', 'Laura', 'Amine', 'Baptiste', 'Cloé', 'Enzo', 'Fabien', 'Florian', 'Guillaume', 'Jean-Baptiste', 'Jean-Maxime', 'Jim', 'Jonathan', 'Kevin', 'Marlene', 'Nathalie', 'Nicolas', 'Nizar', 'Perrine', 'Sarah', 'Stephane Vivier', 'Stephane Jacot', 'Stephane Van Pe', 'Stephane Barucq', 'Sylène Manusset', 'Vanessa', 'Yann']; | |
| let arrSuj = []; | |
| let arrLen = myArr.length; | |
| let compteur = 0; | |
| let compteurGroupeDeQuatre = 1; | |
| console.log('GROUPE 1'); | |
| console.log(' '); | |
| function inputTopic() { |