Comme indiqué ci-dessous :
Copiez le code comme suit :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<tête>
<méta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Utilisation des arguments</title>
</tête>
<corps>
<script type="text/javascript">
fonction affichage() {
document.writeln('Cette société possède' + arguments.length + 'personne');
var somme = 0 ;
pour (var i = 0; i < arguments.length; i++) {
somme += arguments[i];
}
retourner la somme ;
}
somme = affichage (1000, 2000, 3000, 4000, 5000) ;
document.writeln('sum1:' + somme + '<br/>');
somme = affichage (100, 200, 300);
document.writeln('sum2:' + somme);
</script>
</corps>
</html>