Im a beginner and I often need to see a variable's value to make sure I am picking the right method / property /selector for jQuery or just to see what the value is or debugging in general. So what I usually do is
console.log("phone_number: " + phone_number);
I want to create my own 'console.log' function where I simply put the variable(or many variables) as parameters and neatly print out the results.
mylog(phone_number, name, address);
would output to console:
phone_number: 911
name: stanek
address: undefined
Its not a huge deal typing out the first way but I feel like there must be a better way of doing it... and I want to save time.
The answers to previous related questions usually involve remarks such as 'you already know the name' or 'what good reason do you have for this'. I feel this scenario shows a specific need for this request.
I have a feeling that this isn't built into Javascript or it would have been in an answer somewhere.
My curious question is: Why isn't this a feature of Javascript?
My determined question: Is it possible for me to add this feature to Javascript? I'm willing to spend countless hours to save 20 seconds.