Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Assigning All NodeLists A New Function


NodeList.prototype.forEach = function()
	  {
	  	
		
		  for(var i =0; i<this.length; i++)	
		  {
		  	
			  console.log(this[i].textContent);
		  }
		
		
		
	  }	 
let x = 	  document.querySelectorAll(".myclass");
x.forEach();
Comment

PREVIOUS NEXT
Code Example
Javascript :: string concat in js 
Javascript :: js floor a number 
Javascript :: how to put multiple conditions in if statement node .js 
Javascript :: .pop javascript 
Javascript :: how to call ajax javascript 
Javascript :: javascript static methods 
Javascript :: last five characters of string javascript 
Javascript :: do while loop js 
Javascript :: loop on each character js 
Javascript :: array sort 
Javascript :: how to comment in javascript 
Javascript :: javascript learning 
Javascript :: Multiple functions in javascript onclick 
Javascript :: stringbuffer javascript 
Javascript :: nodejs 
Javascript :: map && arrow function in javascript 
Javascript :: history of react js 
Javascript :: get class of object javascript 
Javascript :: objects in array 
Javascript :: how to check if a user is logged in javascript 
Javascript :: ilan mask 
Javascript :: ajax form submit 
Javascript :: js get smallest value of array 
Javascript :: Using the Set object 
Javascript :: axios remove existing token 
Javascript :: add array type to sequelize migration 
Javascript :: js check for obj property 
Javascript :: js var part of var name 
Javascript :: got back to start of for loop js 
Javascript :: javascript string problems 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =