Define yourself in JS { JS practice }

Hey guys so I wanted since it's a good practice....why not define ourself in coding? 

if I explain you will take a base or a core function and you will define yourself by using this core function 

var Entity = new Entity_Basefunction Entity_Base() {var inteligence = 0;var language = [];var sexe = undefined;var race = undefined;var art_level = 0; // maximum on 10var programing_level = 0;var music_level = 0;var design_level = 0;var event_level = 0;var pixel_level = 0;}and with that you have your OWN imagination to create yourself as a function  you have the right to extend the core function AS LONG this not DIRECT overwrite like copy paste and change directly the function....

why this practice because it's permit to show to other people ways for coding AND obviously ways for show your level in coding c: !

the directive : 

  • Create a function with your name who inherit of Entity_Base
  • redefine ALL the var in your functions!
  • At least add one new thing's in your function

mine is not so good since I am not so used to JS but I tried hard :c

Spoiler
function Nio_Kasgami() {Entity.prototype.inteligence = 78;Entity.prototype._language.push("French","English");Entity.prototype.sexe = "male";Entity.prototype.race = "French-Canadian";Entity.prototype.art_level = 8.5;Entity.prototype.programing_level = 5.5;Entity.prototype.music_level = 2;Entity.prototype.design_level = 7;Entity.prototype.event_level  = 6;Entity.prototype.pixel_level  = 3;this.create_new_data();} Nio_Kasgami.prototype.create_new_data = function(){ return "Nioniese";} 
so now your turns guys 😀 !

EDIT : fixed a bunch of unnecessary code :/
@nio, this is kinda funny, but I also think you have probably over exhausted yourself with JS this last month, no?

You have a new bed, get some sleep 😉

Also for race, you should simply put human, like the rest of us. There is no such things as different races...

French Canadian would be your origin, not your race.
@nitenman:

Spoiler
race2

reɪs/

noun

noun: race; plural noun: races

each of the major divisions of humankind, having distinct physical characteristics.

"people of all races, colours, and creeds"

synonyms: ethnic group, racial type, (ethnic) origin

"the school has pupils of many different races"

the fact or condition of belonging to a racial division or group; the qualities or characteristics associated with this.

synonyms: ethnic group, racial type, (ethnic) origin

"the school has pupils of many different races"

a group of people sharing the same culture, history, language, etc.; an ethnic group.

"we Scots were a bloodthirsty race then"

synonyms: ethnic group, racial type, (ethnic) origin More

a group or set of people or things with a common feature or features.

"some male firefighters still regarded women as a race apart"

synonyms: group, type, sort, class, kind, variety, ilk, genre, cast, style, brand, vintage, order, breed, species, generation

"a new race of novelists had appeared"

BIOLOGY

a population within a species that is distinct in some way, especially a subspecies.

"people have killed so many tigers that two races are probably extinct"

(in non-technical use) each of the major divisions of living creatures.

"a member of the human race"

literary

a group of people descended from a common ancestor.

"a prince of the race of Solomon"

synonyms: family, line, lineage, house, dynasty, stock, blood, folk, clan, tribe; More

archaic

ancestry.

"two coursers of ethereal race"
SPECIES would be human.

Anyway I'll have a go at this later 🙂
OK, I started going off topic, so hotfire, we can take this to PM on later if you want but:

Even though there is a broad scientific agreement that essentialist and typological conceptualizations of race are untenable, scientists around the world continue to conceptualize race in widely differing ways, some of which have essentialist implications.While some researchers sometimes use the concept of race to make distinctions among fuzzy sets of traits, others in the scientific community suggest that the idea of race often is used in a naiveor simplistic way, and argue that, among humans, race has no taxonomic significance by pointing out that all living humans belong to the same species, Homo sapiens, and subspecies, Homo sapiens sapiens.

I'm not fond of people using race as a term of distinction to be honest, so maybe adding species is enough, and change race for ethnical group.

End of off topicism, nio sorry for the hijack.
var Person = {


defaultState: {


name: null,


jobDescription: null,


RpgMakeLover: false


},


name: function (name) {


defaultState.name = name;


},


jobDescription: function (najobDescriptionme) {


defaultState.jobDescription = jobDescription;


},


RpgMakeLover: function (boolean) {


defaultState.RpgMakeLover = boolean;


},


getInfo: function() {


console.log(defaultState.name + ', ' + defaultState.jobDescription + ', ' + defaultState.RpgMakeLover);


}


}


module.exports = Person;


// Else Where:


Var PersonClass = require('./person.js');


PersonClass.name('Adam');


PersonClass.jobDescription('Senior Web Developer');


PersonClass.RpgMakeLover(true);


PersonClass.getInfo();

Original thread: https://forums.rpgmakerweb.com/threads/define-yourself-in-js-js-practice.45490/