Skip to content

Instantly share code, notes, and snippets.

View rxlabz's full-sized avatar
🤖
Fluttering

Erick Ghaumez rxlabz

🤖
Fluttering
View GitHub Profile
var prenom = "paul";
// TODO : ajouter une majuscule
/*
?
*/
console.log('prenom avec premiere lettre en majuscule', /* ? */ ); //Paul
var users = ["joe", "lea", "bob", "ann"];
/*
* Texte / Chaines de caractères / String
* fonctions utiles : indexOf, slice, charAt, toLowerCase
* cf. https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/String
*/
// longueur
var texte = "un texte à utiliser pour les exemples";
// TODO
var voyelles = "aeiouy";
// la fonction reçoit un caractère en paramètre et doit renvoyer true si le texte contient une voyelle, false sinon
function estUneVoyelle( lettre ){
return voyelles.indexOf(lettre) > -1;
}
console.log("estUneVoyelle('f') :", estUneVoyelle('f') ); // false
console.log("estUneVoyelle('a') :", estUneVoyelle('a') ); // true
console.log("estUneVoyelle() :", estUneVoyelle() ); // false
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Capitales</title>
<script>
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Henri 5 - DOM - version simple</title>
<style>
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Calcul mental DOM</title>
</head>
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Henri 5 - DOM - version simple</title>
<style>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Exemple DOM</title>
<style>
Prévention canicule
En cas de canicule, préservez votre santé et celle des personnes fragiles qui vous entourent.
[En savoir plus]() sur la politique "Santé et développement" de la Métropole
Les risques
L'exposition à de fortes chaleurs est une agression pour l'organisme. On risque une déshydratation, l'aggravation d'une maladie chronique ou un coup de chaleur. Certains symptômes doivent alerter :
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Calcul mental DOM</title>
<style>
html, body{