Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

why inspect tool display extra undefined

102

If you're running console.log() from a JS file, this undefined line should not be appended.

If you're running console.log() from the console itself, it makes sense. This is why: In the console you can type a name of a variable (for example try typing window) and it prints info about it. When you run any void function (like console.log) from the console, it also prints out info about the return value, undefined in this case.

I tested both cases on my Chrome (Mac ver 23.0.1271.101) and indeed I see the undefined line when I run it inside the console. This undefined also appears when I write this line in the console: var bla = "sdfdfs"
Comment

PREVIOUS NEXT
Code Example
Javascript :: decrease touchableopacity in react native 
Javascript :: jquery visibility effects 
Javascript :: fabric js background pathern 
Javascript :: how to add redirec router in angular 
Javascript :: get switchery to load after an ajax call 
Javascript :: ipv6 dual regex angular 
Javascript :: rotation in p5 play 
Javascript :: click and copy jquery dynamic content 
Javascript :: Ocultar o mostrar elementos HTML con JQuery 
Javascript :: bundle all css js files 
Javascript :: js repeat from string num 
Javascript :: how do i make largest swap javascript stack overflow 
Javascript :: put my angular project in subfolder. 500 INTERNAL ERROR 
Javascript :: enum mongoose doesnt trigger error 
Javascript :: javascripte 
Javascript :: js event problem solving 
Javascript :: JSDOM - serialize() // returns dom as string 
Javascript :: validate url javascript 
Javascript :: passar a página atual na url js net core 
Javascript :: Diff is not a function in Moment.js 
Javascript :: How long does it take to learn to code 
Javascript :: create react app run test apecific folfer 
Javascript :: 5.3.1.2. Logical OR¶ 
Javascript :: Dynamically bind layouts android with json array 
Javascript :: elasticsearch performance 
Javascript :: exemple de modal reactjs 
Javascript :: (Math.floor(Math.random() * 90000) + 10000).toString(); 
Javascript :: array destructuring mdn 
Javascript :: exit ios inspector in react native 
Javascript :: CELEBRITY PROBLEM 2 gfg 7-18-21 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =