God's grace is given to all people through Christ’s sacrifice. This means that salvation is not limited to those who believe, but is extended to everyone. However, those who believe in Christ experience the fullness of life, walking in faith and joy.
"For as in Adam all die, so also in Christ all will be made alive."
1 Corinthians 15:22
"For God has bound everyone over to disobedience so that he may have mercy on them all."
Romans 11:32
"For the grace of God has appeared that offers salvation to all people."
Titus 2:11
"And I, when I am lifted up from the earth, will draw all people to myself."
John 12:32
// Class representing a person
class Person {
constructor(name, isBeliever) {
this.name = name;
this.isBeliever = isBeliever;
}
experienceLife() {
let message = `${this.name} is saved by God's grace through Christ.`;
if (this.isBeliever) {
message += ` ${this.name} lives in the fullness of life through faith in Christ!`;
} else {
message += ` ${this.name} is saved but does not experience the full joy of knowing Christ.`;
}
return message;
}
}
// Class representing God's Grace
class Grace {
constructor() {
this.message = "For as in Adam all die, so also in Christ all will be made alive. (1 Corinthians 15:22)";
}
applyGrace(person) {
return `God’s grace covers ${person.name}: ${this.message}
` + person.experienceLife();
}
}
// Function to simulate salvation and display result
function showSalvation() {
let name = document.getElementById("name").value;
let isBeliever = document.getElementById("believer").checked;
if (name === "") {
alert("Please enter your name.");
return;
}
let person = new Person(name, isBeliever);
let grace = new Grace();
let resultMessage = grace.applyGrace(person);
document.getElementById("result").innerHTML = resultMessage;
}