<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://jerryfleurival.github.io/skills-github-pages/feed.xml" rel="self" type="application/atom+xml" /><link href="https://jerryfleurival.github.io/skills-github-pages/" rel="alternate" type="text/html" /><updated>2024-11-04T10:53:27+00:00</updated><id>https://jerryfleurival.github.io/skills-github-pages/feed.xml</id><title type="html">GitHub Page Training</title><subtitle>This is a course about how to create a page on GitHub. Github-actions[bot] is monitoring my progress.</subtitle><author><name>Jerry Fleurival</name></author><entry><title type="html">A-JavaScript-Class</title><link href="https://jerryfleurival.github.io/skills-github-pages/2024/11/01/a-javascript-class.html" rel="alternate" type="text/html" title="A-JavaScript-Class" /><published>2024-11-01T00:00:00+00:00</published><updated>2024-11-01T00:00:00+00:00</updated><id>https://jerryfleurival.github.io/skills-github-pages/2024/11/01/a-javascript-class</id><content type="html" xml:base="https://jerryfleurival.github.io/skills-github-pages/2024/11/01/a-javascript-class.html"><![CDATA[<h3 id="how-to-create-a-javascript-class">How to create a JavaScript Class</h3>

<p>In the example below, you have a class named “AI” and in this class it has two constructor variables: name and specialty.
The name is the name of the AI Tool or AI Application, and the specialty is what the AI Tool can do. There are 
three meethods, which behaves like functions: introduce, learn, and performTask that enables each instance to expand on 
what they do or what should be happening.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class AI {
  constructor(name, specialty) {
      this.name = name;
      this.specialty = specialty;
    }

    introduce() {
      console.log(`Hello, I am ${this.name}, and I specialize in ${this.specialty}.`);
    }

    learn(newSkill) {
      console.log(`${this.name} is learning ${newSkill}...`);
    }

    performTask(task) {
      console.log(`${this.name} is performing task: ${task}.`);
    }
}

// Creating an instance of the AI class
const aiBot1 = new AI('Copilot', 'Natural Language Processing');
const aiBot2 = new AI('UltimateVision', 'Identifies all objects and gives their full profile or description.');

// Using the methods
aiBot1.introduce();
aiBot1.learn('Machine Learning Algorithms');
aiBot1.performTask('Data Analysis');

aiBot2.introduce();
aiBot2.learn('Animals');
aiBot2.performTask('Watching Lions behavior.');
</code></pre></div></div>]]></content><author><name>Jerry Fleurival</name></author><summary type="html"><![CDATA[How to create a JavaScript Class]]></summary></entry></feed>