0
Why this Returns to Definde 💔 ?
var x = $("div").text(); Consle.log(x); <div>10</div>
3 Respostas
+ 1
Lord Krishna
Same Result 🤔
https://code.sololearn.com/WuM0awymgjm8/?ref=app
* Direct link
- 1
You are calling the DOM selector code before your html document is read.
put the script after the those element or wrap it onload
window.onload = function(){
//js code
}
- 1
Yeah, hello is not definied. Quote it or define a function/variable named hello.
Like "Hello"
Or
var hello = "my variable named hello"
On a side note please share direct links to codes. Those short links are an unneccesary redirect and shoudn't be trusted.