Ajout exercices supplémentaires formation JS

This commit is contained in:
2015-04-01 22:05:05 +02:00
committed by Benjamin Bohard
parent ee0ae6d1be
commit b1cbcaefd3
3012 changed files with 363655 additions and 126 deletions

View File

@ -0,0 +1,20 @@
/*
* Énoncé:
*
* Étant donné l'opérateur "typeof", qui donne le type d'une valeur
* sous la forme d'une chaine de caractères, implémenter la fonction
* showTypesOfArguments() qui affiche pour chaque argument passé sa
* valeur et son type associé, quel que soit le nombre d'arguments passés.
*/
// Exemple d'utilisation de "typeof"
console.log(typeof 5); // -> 'number'
var foo = 'bar';
console.log(typeof foo);
function showTypesOfArguments() {
// ???
}
showTypesOfArguments(5, 'hello world', {foo: 'bar'}, new Date());

View File

@ -0,0 +1,5 @@
<html>
<body>
<script src="arguments.js"></script>
</body>
</html>