How do I print out values of an object in javascript


#1

https://www.codecademy.com/courses/learn-java/lessons/object-oriented-programming/exercises/objects?action=resume_content_item

i tried using the console.log(objectname); but it gives me the error

Dog.java:14: error: cannot find symbol
console.log(spike);
^
symbol: variable console
location: class Dog
1 error


#2

console.log() is javascript, System.out.println() is java.

java and javascript are two very different languages.


#3

thank you am trying to learn both by picking object oriented concepts from java