<!-- Dedicated to God the Father -->
<!-- All Rights Reserved Christopher Andrew Topalian Copyright 2000-2024 -->
<!-- https://github.com/ChristopherTopalian -->
<!-- https://github.com/ChristopherAndrewTopalian -->
<!-- Topalian_JavaScript_Objects.html -->
<!-- Version 001 - (2024-12-20) -->
<html>
<head>
<title> Topalian JavaScript Objects 001 </title>
<style>
body
{
background-color: rgb(30, 30, 30);
font-family: Arial;
font-size: 24px;
color: rgb(255, 255, 255);
}
</style>
<script>
// shortcuts.js
function ge(whichId)
{
let result = document.getElementById(whichId);
return result;
}
function ce(whichType)
{
let result = document.createElement(whichType);
return result;
}
function ba(whichElement)
{
let result = document.body.append(whichElement);
return result;
}
function cl(whichMessage)
{
let result = console.log(whichMessage);
return result;
}
function ct(whichText)
{
let result = document.createTextNode(whichText);
return whichText;
}
//-//
// data
let joan =
{
name: 'Joan',
type: 'Human',
power: 'Engineering',
phoneNumbers: [
'555-555-5557',
'555-555-5558',
'555-555-5559'
],
emails: [
'joan555@mailer.com',
'joan555@themail.com',
'joan555@mailing.com'
],
hairColor: 'Brown',
hairStyle: 'Straight',
hairLength: 'Shoulder',
eyeColor: 'Brown',
skinColor: 'White',
weight: 120, // lbs
height: 59, // inches
dob: '12/14/2000'
};
//-//
function makeResultDiv()
{
let resultDiv = ce('div');
resultDiv.textContent = JSON.stringify(joan);
ba(resultDiv);
}
//-//
function whenLoaded()
{
makeResultDiv();
}
</script>
</head>
<body onload = 'whenLoaded();'>
</body>
</html>