Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Untitled diff
Creado
hace 11 años
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
21 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
50 líneas
Copiar todo
46 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
48 líneas
Copiar todo
// Define variables
// Define variables
var output = document.getElementById("message");
var output = document.getElementById("message");
Copiar
Copiado
Copiar
Copiado
var movies = document.getElementById("movies");
var object = document.getElementById("object");
var BR = "<br>";
var BR = "<br>";
Copiar
Copiado
Copiar
Copiado
var makeBreakfast;
var mood;
var energyLevel;
var doWork;
var powerOn;
var command;
var duration;
var quitWork;
// Define robot object
// Define robot object
var robot = {
var robot = {
Copiar
Copiado
Copiar
Copiado
material: "titanium",
material: "titanium",
mood: "happy",
mood: "happy",
energyLevel: 100,
energyLevel: 100,
powerOn: false,
powerOn: false,
command: "Sweeping the floor",
command: "Sweeping the floor",
duration: 10,
duration: 10,
favoriteMovies: ["2001: A Space Odyssey", "The Terminator", "I, Robot",
"WALL-E", "Short Circuit", "Forbidden Planet"]
favoriteMovies: ["2001: A Space Odyssey", "The Terminator", "I, Robot",
"WALL-E", "Short Circuit", "Forbidden Planet"]
,
};
makeBreakfast:
function (newMood) {
this.
mood = newMood;
makeBreakfast =
function (newMood) {
if (
this.
mood === "Happy") {
mood = newMood;
output.innerHTML += "Here are your waffles and milk, master." + BR;
if (
mood === "Happy") {
} else {
output.innerHTML += "Here are your waffles and milk, master." + BR;
output.innerHTML += "Here is your burnt toast and lukewarm water, master." + BR;
} else {
this.
energyLevel = 50;
output.innerHTML += "Here is your burnt toast and lukewarm water, master." + BR;
}
energyLevel = 50;
},
}
doWork:
function () {
};
if (!
this.
powerOn) {
doWork =
function () {
this.
powerOn = true;
if (!
powerOn) {
output.innerHtml += "My current task is: " +
this.
command + ". Duration: " +
this.
duration + " minutes." + BR;
powerOn = true;
}
output.innerHtml += "My current task is: " +
command + ". Duration: " +
duration + " minutes." + BR;
},
}
quitWork:
function () {
};
if (
this.
powerOn) {
quitWork =
function () {
this.
energyLevel = 90;
if (
powerOn) {
this.
powerOn = false;
energyLevel = 90;
this.
command = "Taking a nap";
powerOn = false;
}
command = "Taking a nap";
}
}
};
};
// Make robot do housework
// Make robot do housework
Copiar
Copiado
Copiar
Copiado
doWork();
robot.
doWork();
quitWork();
robot.makeBreakfast('happy');
robot.
quitWork();
for(var i = 0, l = robot.favoriteMovies.length; i < l; i++) {
movies.innerHTML += robot.favoriteMovies[i] + BR;
}
object.innerHTML = JSON.stringify(robot);
Diferencias guardadas
Texto original
Abrir archivo
// Define variables var output = document.getElementById("message"); var BR = "<br>"; var makeBreakfast; var mood; var energyLevel; var doWork; var powerOn; var command; var duration; var quitWork; // Define robot object var robot = { material: "titanium", mood: "happy", energyLevel: 100, powerOn: false, command: "Sweeping the floor", duration: 10, favoriteMovies: ["2001: A Space Odyssey", "The Terminator", "I, Robot", "WALL-E", "Short Circuit", "Forbidden Planet"] }; makeBreakfast = function (newMood) { mood = newMood; if (mood === "Happy") { output.innerHTML += "Here are your waffles and milk, master." + BR; } else { output.innerHTML += "Here is your burnt toast and lukewarm water, master." + BR; energyLevel = 50; } }; doWork = function () { if (!powerOn) { powerOn = true; output.innerHtml += "My current task is: " + command + ". Duration: " + duration + " minutes." + BR; } }; quitWork = function () { if (powerOn) { energyLevel = 90; powerOn = false; command = "Taking a nap"; } }; // Make robot do housework doWork(); quitWork();
Texto modificado
Abrir archivo
// Define variables var output = document.getElementById("message"); var movies = document.getElementById("movies"); var object = document.getElementById("object"); var BR = "<br>"; // Define robot object var robot = { material: "titanium", mood: "happy", energyLevel: 100, powerOn: false, command: "Sweeping the floor", duration: 10, favoriteMovies: ["2001: A Space Odyssey", "The Terminator", "I, Robot", "WALL-E", "Short Circuit", "Forbidden Planet"], makeBreakfast: function (newMood) { this.mood = newMood; if (this.mood === "Happy") { output.innerHTML += "Here are your waffles and milk, master." + BR; } else { output.innerHTML += "Here is your burnt toast and lukewarm water, master." + BR; this.energyLevel = 50; } }, doWork: function () { if (!this.powerOn) { this.powerOn = true; output.innerHtml += "My current task is: " + this.command + ". Duration: " + this.duration + " minutes." + BR; } }, quitWork: function () { if (this.powerOn) { this.energyLevel = 90; this.powerOn = false; this.command = "Taking a nap"; } } }; // Make robot do housework robot.doWork(); robot.makeBreakfast('happy'); robot.quitWork(); for(var i = 0, l = robot.favoriteMovies.length; i < l; i++) { movies.innerHTML += robot.favoriteMovies[i] + BR; } object.innerHTML = JSON.stringify(robot);
Encontrar la diferencia