js as code snippet