Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

In Self Invoking Functions, the This Below Console.Logs The Created Object

	 (function()
 {
	 
	 
	 
	 class Person
	 {
	constructor(name)
		 {
			 this.name = name;
			 console.log(this);
		 }	
	 }
	 
 
	 const p = new Person("John Smith");
	 
 })()
 /*console.log(this) will be Object with name of "John Smith"*/
 
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to add random color in chart in react j 
Javascript :: chrome page transitions 
Javascript :: ms dyn crm associate n:m record js 
Javascript :: A Nodule Module For ExpressJS 
Javascript :: datatables data in one line 
Javascript :: pass a react component as a prop from another component 
Javascript :: javascript reverse string short hand 
Javascript :: confirming the end javascript 
Javascript :: repeater jquery 
Javascript :: how to return data from function in javascript 
Javascript :: dayofyear mongodb 
Javascript :: nesjs rest api 
Javascript :: check if can go back react native 
Javascript :: how to find default or the first server discord.js 
Javascript :: animation in react stack overflow 
Javascript :: javascript check if array has at least one true value 
Javascript :: sort items 
Javascript :: adding number upto n , adding number, fastest number addding 
Javascript :: Using Fetched Data With Backbone 
Javascript :: screen orientation and width&height 
Javascript :: add seconds to date 
Javascript :: break and continue in javascript 
Javascript :: get class name of object javascript 
Javascript :: connect react to backend 
Javascript :: npm google map react 
Javascript :: javascript buffer to file 
Javascript :: babel core cdn 
Javascript :: ref.current.selectionStart 
Javascript :: ring add an attribute to the object 
Javascript :: javascript WeakSets Are Not iterable 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =