To write a JavaScript function to the console, simply use the console.log() method.
<script>
function myFunc(){
return 5 + 5
}
console.log(myFunc())
</script>
// output => 10
To write a JavaScript function to the console, simply use the console.log() method. < script > function myFunc(){ return 5 +...
To write a JavaScript function to the console, simply use the console.log() method.
<script>
function myFunc(){
return 5 + 5
}
console.log(myFunc())
</script>
// output => 10
Comments (0)