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
var cowsay = require("cowsay"); | |
console.log(cowsay.say({ | |
text : "Hello Boy", | |
e : "oO", | |
T : "U " | |
})); | |
// or cowsay.think() |
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 profile = { | |
name: 'Alex', | |
getName (){ | |
return this.name; | |
} | |
}; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<% include ../partials/head %><!--Cette balise appelle une section head indépendante dans mon dossier partials--> | |
</head> | |
<body class="container"> | |
<header> | |
<% include ../partials/header %><!--Cette balise appelle une section header indépendante dans mon dossier partials--> | |
</header> |
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
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
let city = `Bordeaux` | |
let age = `29` | |
const dateOfBirth = `1988` | |
console.log (`J'habite ${city}, j'ai ${age} ans et je suis née en ${dateOfBirth}`); | |
/* CHALLENGE ES6 | |
Profil utilisateur | |
Imaginez que vous construisez une application pour gérer le profil d'un utilisateur. Un profil peut avoir une 'city' (qui peut changer), 'age' (qui change tous les ans) et 'dateOfBirth' (qui ne change pas). | |
Déclarer trois variables avec ces mêmes noms puis une quatrième variable nommée sentence qui concatène l'ensemble des variables ville, age et date de naissance dans une jolie phrase. |
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
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
console.log('Quel est ton âge ?') | |
process.stdin.on('data', function( monAge ) { | |
if ( ( monAge < 99 ) && ( monAge > 0) ) { | |
console.log( 'Je suis née en:' + ( 2018 - monAge ) ) | |
} else if ( monAge > 99 ) { |
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
#1 - Instataller zsh sur mac :brew install zsh | |
#2 - Remplacer les fichiers de configurations | |
# maylisdoucet$ cd ~ /config | |
# maylisdoucet$ vim ~/.zshrc | |
#3 - Aller dans https://explainshell.com/explain?cmd=bash . | |
# Taper "Bash" dans la barre de recherche. | |
# Afficher la signification trouver : "GNU Bourne-Again SHell" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Patates</title> | |
</head> | |
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
/La/g | |
/[0-9]{2}\/[0-9]{2}\/[0-9]{1,4}/g | |
/9\/[0-1]{1,2}/g | |
/format[a-z]{1,4}/g | |
/\([\w ]*\)/g |
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
Variables | |
var = age | |
var = anneenaissance | |
var = anneeactuelle | |
Début | |
Afficher la question "Quel age as tu svp ?" | |
Lire age |