I have been trying to extract the full-text content from the HTML document for computation and I was able to find the solution for that in jquery but it's quite partial... The output is as expected for the following code:
$(document).ready(function(){
console.log($("*").text())
})
This is the output I was talking about. I want to store the content in the console in a variable. When I tried doing something like
var words = []
$(document).ready(function(){
words.push($("*").text())
})
console.log(words)
it returns undefined. I came to know that it is because of the async of the callback. How do I approach this issue. Thanks in advance.