New course! Every coder should learn Generative AI!
Try a free lesson+ 4
Samialloh
Your included jQuery library is not working. Try another
SAN That is with JavaScript not jQuery.
https://code.sololearn.com/W2ns1T4iobWT/?ref=app
+ 4
Samialloh
Add click event on button and reset data
+ 4
Samialloh
One more thing val() can be use to set and get textbox value
And html() is used to get and set value inside any tag
$("#input").val(""); //this will set value
var a = $("#input").val(); //this will get value
-------
$("#input").html(""); //this will set value in any html tag
var val = $("#input").html(); //this will get value from any tag
+ 3
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ Samialloh
Sorry, I didn't notice.
0
I am working in JavaScript, Contact Manager project (#36). I need a space after colon and before the number
function contact(name,number){
this.name = name;
this.number = number;
this.print = print;
}
function print(){
console.log(this.name + ":" + this.number)
}
var a=new.contact("David",12345);
var b=new.contact("Amy",987654321)
a.print();
b.print();
Why is my code not providing a space between tne name and the number?