-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
62 lines (59 loc) · 2.21 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//Constructor
class Element {
constructor( name, symbol, atomic_number, standard_state, atomic_mass, electron_configuration, oxidation_states, allen_scale, pauling_scale, van_der_waals, empirical, covalent, ionization_energy, electron_affinity, mk, mc, mf, bk, bc, bf, density, year_discovered, discovered_by, chemical_group_block, chemical_groupA, chemical_groupB, classification, period ){
this.name = name;
this.symbol = symbol;
this.atomic_number = atomic_number;
this.standard_state = standard_state;
this.atomic_mass = atomic_mass;
this.electron_configuration = electron_configuration;
this.oxidation_states = oxidation_states;
this.electronegativity = {
pauling_scale: pauling_scale,
allen_scale: allen_scale
};
this.atomic_radius = {
van_der_waals: van_der_waals,
empirical: empirical,
covalent: covalent
};
this.ionization_energy = ionization_energy;
this.electron_affinity = electron_affinity;
this.melting_point = {
kelvin: mk,
celsius: mc,
fahrenheit: mf
};
this.boiling_point = {
kelvin: bk,
celsius: bc,
fahrenheit: bf
};
this.density = density;
this.discovered = {
by: discovered_by,
year: year_discovered
};
this.period = period;
this.group = {
block: chemical_group_block,
group_A: chemical_groupA,
group_B: chemical_groupB,
classification: classification
};
}
};
//Chemical elements
const hydrogen = new Element( 'Hydrogen', 'H', 1, 'Gas', 1.0080, '1s1', '+1, -1', 2.3, 2.2, 120, 25, '31(5)', 13.598, 0.754, 13.81,-259.34,-434.81, 20.28, -252.87, -423.17, 0.00008988, 1766, 'Henry Cavendish', 'Non-metal', 1, 'IA', 'Non-metal' , 1 );
const helium = new Element( 'Helium', 'He', 2, 'Gas', 4.00260, '1s2', '0', 4.16, null, 140, null, 28, 24.587, 0, 0.95, -272.2, -458, 4.22, -268.93, -452.07, 0.0001785, 1868, 'Pierre-Jules-Cesar Janssen', 'Noble Gas', 18, 'VIIIA', 'Non-metal', 1 );
//All elements in array according to its atomic number
const element = [
null,
hydrogen,
helium
]
module.exports = {
element,
hydrogen,
helium,
}