Javascript Useful Code Snippets Part – 1 JS code snippets for String Length, String Contains, String to Number, Append to Array and Sleep.