let molecule = new Molecule();
molecule.createAtom(elementSymbol /* type: String */);
elementSymbol
- The symbol corresponding to the element of the atomType: Atom
Instance
The function returns the generated Atom
instance linked to the molecule.
const { Molecule } = require('mcul'); let molecule = new Molecule(); let hydrogen = molecule.createAtom('H'); console.log(hydrogen);