Charat Function In Javascript Geeksforgeeks