Javascript Class method is not invoked or skipped

I am new to Unity, i have created a small dummy class in Javascript and trying to call its method, but it is not invoked

function loadInitialCategories(){
	var objCategoryList = CategoryList1();
	print("inside ************loadInitialCategories");
	//objCategoryList.li
	objCategoryList.loadCategories(1);
	print("inside ***after*********loadInitialCategories");

}

class CategoryList1
{
	//var listCategory = new Array();
	
	function loadCategories(type:int){
		print("inside ************loadCategories"+type);
		var www : WWW = new WWW ("mywebservice");
		yield www;
		 
	    var dataString =www.data;
		print("Fetching the categories " + dataString );
	
		var parsed = JSONParse.JSONParse(dataString);
		
		 
		if(!parsed["result"]||parsed["result"]!="true"||!parsed["data"]){
			return;
		}			
		for(var i=0;i<parsed["data"].length;i++){
			for(var j=0;j<parsed["data"]*.length;j++){*

print(“The id for category at [”+i+“:”+j+"] is : "+ parsed[“data”][j][“category_id”]);
* } *
* }*
* }*

}
I get this as an output
inside ************loadInitialCategories
UnityEngine.MonoBehaviour:print(Object)
DropdownList:loadInitialCategories() (at Assets/CustomScripts/DropdownList.js:44)
DropdownList:Start() (at Assets/CustomScripts/DropdownList.js:10)

inside after******loadInitialCategories
UnityEngine.MonoBehaviour:print(Object)
DropdownList:loadInitialCategories() (at Assets/CustomScripts/DropdownList.js:47)
DropdownList:Start() (at Assets/CustomScripts/DropdownList.js:10)
Can anybody explain what i am doing wrong as i am not able to see this line
print(“inside ************loadCategories”+type);

That won’t work unless you use StartCoroutine, since “loadCategories” is a coroutine that’s in a class not derived from MonoBehaviour (so the auto-StartCoroutine won’t work). Also I’d strongly suggest never using Array; instead use generic List. It’s less confusing if you follow the convention of using lowercase for variables and uppercase for functions.