Head-First-JavaScript-Programming
Head-First-JavaScript-Programming copied to clipboard
Removed html code, which was added by mistake.
var x = ["abc", 123]; var y = typeof x; console.log(y); I was expecting the output "array" but it resulted as an object. How come array be an object ?
function init() { var drink = document.getElementById("coffee"); drink.innerHTML = "I love tea."; drink.setAttribute("color", "red"); } ``` window.onload = init; ``` I love coffee. This is my code. I have selected...
I see that we need to declare the variable "i" in the for loop using the keyword "var". example for ( var i = 0 ; i
var age = 7; function addOne (x) { x = x +1; } addOne(age); document.write(age); I'm gonna break this down the way I have understood. So, we have a function...
Hi, I am doing the final exercise for matching words forwards and backwards. Curious about this line ``` var len = this.length-1; ``` When I try to do lexical scope...
Hi, I am new to JavaScript. Is it a typo or what. According to the book, the best location to put is just before . So there are duplicated ??
When we call barnaby and spot is the instance object value already set to true automatically even though our prototype is set to false? As I was tracing through trying...
Curious if there is a forum for this book and if that is the proper avenue to ask questions. Thanks