Questions tagged «dynamic-languages»

25
JavaScript .prototype වැඩ කරන්නේ කෙසේද?
මම එය ගතික ක්‍රමලේඛන භාෂාවලට නොව ජාවාස්ක්‍රිප්ට් කේතයේ මගේ සාධාරණ කොටස ලියා ඇත. මෙම මූලාකෘති පාදක කරගත් ක්‍රමලේඛනය වටා මා කිසි විටෙකත් හිස ඔසවා නැත, මෙය ක්‍රියාත්මක වන්නේ කෙසේදැයි කිසිවෙකු දන්නවාද? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test(); ටික කලකට …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.