JSFiddle - React, Tailwind, and code Playground

by hqul1102

HTML

<!DOCTYPE html>

<html>
<head>
  <title></title>
</head>

<body>
  <a href="#">Hi</a>
</body>
</html>

JavaScript

//get reference to element node object
var nodeAnchor = document.querySelector('a');

//create props array to store property keys for element node object
var props = [];

//loop over element node object getting all properties & methods (inherited too)
for(var key in nodeAnchor){
    props.push(key);   
}

//log alphabetical list of properties & methods 
console.log(props.sort());