Skip to content

Not daily javascript issues that can be used for quiz

Notifications You must be signed in to change notification settings

ufocoder/javascript.quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

JavaScript.Quiz

Public issue collection of What will be output? that can be used for any javascript quiz or interview

Table of contents:

Operators issues

console.log(-100 < 0 < 100);
console.log(-100 > 0 > 100);
var number = 0;

console.log(number++);
console.log(++number);
console.log(number);
var isJavaScriptSexist = '👧' < '👨';

console.log(isJavaScriptSexist)
var trees = ["xyz", "xxxx", "test", "ryan", "apple"];

delete trees[3];

console.log(trees.length);

Scope issues

var foo = 'Hello';

(function() {
  var bar = ' World';
  console.log(foo + bar);
})();

console.log(foo + bar);
myname = "global"; 

function func() { 
    console.log(myname); 
    var myname = "local"; 
    console.log(myname); 
} 

func(); 

Prototype issues

var Employee = {
  company: 'xyz'
}
var emp1 = Object.create(Employee);

delete emp1.company

console.log(emp1.company);
var obj = {
    '0': 'a',
    '1': 'b',
    '2': 'c',
    'length': 3
}

obj.__proto__ = Array.prototype

console.log(...obj)

About

Not daily javascript issues that can be used for quiz

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published