What kind of bad things would happen if I implement class in javascript this way?
I've watched about how to do OOP in javascript from http://www.gotoandlearn.com/play.php?id=159

My approach to do OOP in javascript is totally different from the video above. Being new to javscript, I'm afraid there would be some flaw in my approach. What could go wrong if I implement this way (hopefully this exemplary source code is self-explanatory):

	//A_Class.js

	define(
		["dependencies", "baseClass"],
		function(dependencies, baseClass) {
			
			var _privateStaticFunc = function() {};
			var _privateStaticVar = 1;
			
			return {
				publicStaticFunc: function() {},
				publicStaticVar: 10,
				
				//This is constructor to instantiate this class' object
				create: function() {
					var _self; //_self is... so that private function can refer to "this"
					
					var _privateFunc = function() { _privateVar = _self.publicVar * 120; };
					var _privateVar = 0;
					
					//here _self is assigned to "this"
					return _self = {
						prototype: baseClass.create(), //if I need to subclass
					
						publicVar: "this is public var",
						publicFunc: function() { return _privateVar; }
					};
				}
			};
		}
	);


(and it use requirejs, btw. Hopefully it is still understandable)
What kind of bad things would happen if I implement class in javascript this way?
===

I've watched about how to do OOP in javascript from http://www.gotoandlearn.com/play.php?id=159

My approach to do OOP in javascript is totally different from the video above. Being new to javscript, I'm afraid there would be some flaw in my approach. What could go wrong if I implement this way (hopefully this exemplary source code is self-explanatory):

	//A_Class.js

	define(
		["dependencies", "baseClass"],
		function(dependencies, baseClass) {
			
			var _privateStaticFunc = function() {};
			var _privateStaticVar = 1;
			
			return {
				publicStaticFunc: function() {},
				publicStaticVar: 10,
				
				//This is constructor to instantiate this class' object
				create: function() {
					var _self; //_self is... so that private function can refer to "this"
					
					var _privateFunc = function() { _privateVar = _self.publicVar * 120; };
					var _privateVar = 0;
					
					//here _self is assigned to "this"
					return _self = {
						prototype: baseClass.create(), //if I need to subclass
					
						publicVar: "this is public var",
						publicFunc: function() { return _privateVar; }
					};
				}
			};
		}
	);


(and it use requirejs, btw. Hopefully it is still understandable)