notes on js structure