console.log input output javascript code example
Example 1: js console log input value
<input type="text" placeholder="name" id="uname" />
<input type="button"value="submit" onclick="send()" />
let uname = document.querySelector("#uname");
function send() {
console.log(uname.value);
}
Example 2: change console log to print javascript
function print(value) {
console.log(value)
}
print("Hello")