tutorial for .js example