tests examples - js code