JSFiddle - React, Tailwind, and code Playground

by Zaheer Ahmed

JavaScript

var Student = function () {
    this.first_name;
    this.last_name;
    this.courses = [];

    this.fullName = function () {
        return this.first_name + ' ' + this.last_name;
    };
};

var student = new Student();

student.first_name = "Ali";
//runtime added property not present in class
student.middle_name = "H.";
student.last_name = "Raza";
student.courses = ["JavaScript", "Object Orient Programming", "Functional Programming"];
student.skills = function () {
    return "Expert in JavaScript";
}

console.log(student.skills());