You need a working jsfiddle please
Assignment
So you will get to have a little fun with this assignment. You will model a caffeine molecule as a graph and present that computer model. Edges that are single bonds should be presented with a weight of 1, with a double bond - they should have a weight of 2.
Build your model as a Graph. The graph should be able to print all of its Nodes with each adjacent node. You can have a print button or simply call it when the Graph is built.
Output:
H (C) <- there will be 9 of these
C (N,H) <- there will be 3 of these
N (C, C, C) <- there are 3 of these
N (C, C) <- only one of these
etc....
etc...
for each element and combination of connected element