Will this code make an error in chrome?

will this code make an error in chrome? Is there something wrong?

console.log(111111111)
(function() {
    console.log(33333)
})()
console.log(222222)

clipboard.png

Feb.28,2021

add a semicolon, otherwise the parsing may make an error

console.log(111111111);
(function() {
    console.log(33333)
})();
console.log(222222);

parsing questions
execute separately or add; number


console.log(111111111);
(function() {
    console.log(33333);
})()
console.log(222222);

remember to add a semicolon or the result returned by console.log will be treated as a function and fun will be executed as a parameter. However, if console.log returns not as a function, it will report an error

.

the old man pinches and calculates that this code will report an error in any browser! You're going to hell if you're wrong about chrome.


console.log (111111111); problems with semicolons

Menu