Javascript 0
Javascript es un lenguaje:
- Interpretado
 - Débilmente tipado
 - Orientado a objetos
 - Case Sensitive
 
El lenguaje de programación javascript se utiliza principalmente para dotar de funcionalidades a las páginas web. El código se incluye en el documento xHTML directamente o se enlaza a través de una referencia. A partir de ahí puede hacerse que JS se ejecute directamente o a partir de eventos.
Hola Mundo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> 
<head> 
 <title>Plantilla xHTML + js</title> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
 <meta name="keywords" content="" /> 
 <meta name="description" content="" /> 
 <meta name="author" content="Yo mismo con mi organismo" /> 
 <meta name="generator" content="edit de MSDOS" /> 
 
   <script type="text/javascript"> 
//<![CDATA[ 
 
var numero = 42; 
var temperatura = 34.5; 
var x,y,z; 
var nombre = "Mi nombre es \"Legión\""; 
var delantero = 'Ibra"""'; 
var vacio = null; 
var verdadero = true; 
 
var arreglo = new Array(); 
 
arreglo[0] = "Hector"; 
arreglo[1] = "Xabi"; 
arreglo[2] = "Adrian"; 
arreglo[3] = "Danilo"; 
 
var valores = new Array(15,42,69,101,256); 
 
x = y = z = 0; 
 
superfuncion(); 
//recorrer(arreglo); 
 
function superfuncion () 
{ 
    alert("Hola mundo: " +  nombre + " y me gusta " + delantero); 
     
} 
 
function recorrer(ar) 
{ 
    var i = 0; 
     
    //for(;;) 
    for(i=0;i<ar.length;i++) 
    { 
        alert(i + ">" + ar[i]); 
    } 
} 
 
var foo = 0; 
 
// Tu kung foo es muy bueno. 
 
foo = prompt("Dame un valor primo."); 
alert("Has metido: " + foo); 
 
//]]> 
</script> 
      
</head><body> 
<h1>Plantilla</h1> 
</body> 
</html>
Operadores
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> 
<head> 
 <title>Operadores</title> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
 <meta name="keywords" content="" /> 
 <meta name="description" content="" /> 
 <meta name="author" content="Yo mismo con mi organismo" /> 
 <meta name="generator" content="edit de MSDOS" /> 
 
   <script type="text/javascript"> 
//<![CDATA[ 
 
var numero = 42; 
var temperatura = 34.5; 
 
var a,b,c; 
 
a = b = c = 0; 
 
// operadores aritméticos: + - * / % ++ -- 
a++; 
a++; 
 
// ¿Cuánto vale b? 
b = ++a; 
 
// ¿y cuánto vale c? 
c = a++; 
 
c--; 
--c; 
b=--c; 
 
c = c + 45; 
 
c += 45; 
 
// Comparación: < > != == === 
a=4; 
if (a == "4") 
{ 
    // concatenamos cadenas con + 
    alert("Son iguales: " + a + " y 4"); 
} 
 
if (a === "4") 
{ 
    alert("Noooo"); 
} 
 
a= 0; 
 
 
 
 
alert("a: " + a + " b: " + b); 
 /* 
  operadores 
 */ 
 
//]]> 
</script> 
      
</head><body> 
<h1>Operadores</h1> 
</body> 
</html>
    pello.io