https://github.com/ufocoder/javascript.quiz
Not daily javascript issues that can be used for quiz
https://github.com/ufocoder/javascript.quiz
Last synced: 3 months ago
JSON representation
Not daily javascript issues that can be used for quiz
- Host: GitHub
- URL: https://github.com/ufocoder/javascript.quiz
- Owner: ufocoder
- Created: 2019-08-02T10:56:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-02T11:13:14.000Z (almost 7 years ago)
- Last Synced: 2025-02-22T07:51:14.358Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](#operators-issues)
* [Scope issues](#scope-issues)
* [Prototype issues](#prototype-issues)
### Operators issues
1.
```
console.log(-100 < 0 < 100);
console.log(-100 > 0 > 100);
```
2.
```
var number = 0;
console.log(number++);
console.log(++number);
console.log(number);
```
3.
```
var isJavaScriptSexist = '👧' < '👨';
console.log(isJavaScriptSexist)
```
4.
```
var trees = ["xyz", "xxxx", "test", "ryan", "apple"];
delete trees[3];
console.log(trees.length);
```
### Scope issues
1.
```
var foo = 'Hello';
(function() {
var bar = ' World';
console.log(foo + bar);
})();
console.log(foo + bar);
```
2.
```
myname = "global";
function func() {
console.log(myname);
var myname = "local";
console.log(myname);
}
func();
```
## Prototype issues
1.
```
var Employee = {
company: 'xyz'
}
var emp1 = Object.create(Employee);
delete emp1.company
console.log(emp1.company);
```
2.
```
var obj = {
'0': 'a',
'1': 'b',
'2': 'c',
'length': 3
}
obj.__proto__ = Array.prototype
console.log(...obj)
```