Mi experimentación
<meta charset="utf-8">
<script type="text/javascript">
//Print break
function lineBreak() {
document.write("<br>")
document.write("<br>")
};
//Print phrase
function prnt(phrase) {
document.write(phrase);
lineBreak();
};
var year = 2022;
var nameK = "Kaozidd";
var nameF = "Fanny";
var nameS = "Sara";
var ageKaozidd = 26;
var ageFanny = 29;
var ageSara = 30;
var sumAge = ageKaozidd+ageFanny+ageSara;
var avrg = (sumAge)/3;
//Printing the siblings' ages
prnt(nameK + "'s age is " + (year - 1996));
prnt(nameF + "'s age is " + (year - 1993));
prnt(nameS + "'s age is " + (year - 1992));
//Adding the ages together
prnt("<h3>The sum of their ages is: " + sumAge + "</h3>");
//Printing birth years
prnt(nameK + " was born in: " + (year - ageKaozidd));
prnt(nameF + " was born in: " + (year - ageFanny));
prnt(nameS + " was born in: " + (year - ageSara));
//Averaging the ages
prnt(
"<h3>The average of " +
nameK +
", " +
nameF +
", and " +
nameS +
"' age is: "
+ Math.round(avrg) +
"</h3>"
);
//Calculating the difference of age between siblings
prnt("<h3>" + nameK + "'s " + (ageSara-ageKaozidd) + " years younger than " + nameS);
prnt("<h3>" + nameK + "'s " + (ageFanny-ageKaozidd) + " years younger than " + nameF);
prnt("<h3>" + nameF + "'s " + (ageSara-ageFanny) + " years younger than " + nameS);
</script>