Js article code

This article did not have fully fleshed out examples but had code snippets. So I put each snippet into its own function to separate. Pull also includes a pubspec file for now.