This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const list = ["yey", "wuw"]; | |
list.valueOf = () => "JAVASCRIPT SO EASY!"; | |
if (Array.isArray(list)) console.log("IM AN ARRAY") | |
if (list.some(val => val === "yey")) console.log("YEY EXIST") | |
if(list == "JAVASCRIPT SO EASY!"){ | |
list.valueOf = () => 1; | |
console.log("IM ALSO STRING") | |
} | |
if(1 == list) console.log("IM ALSO NUMBER") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 == "0" // true | |
0 == "1" // false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-12-14T13:22:47.851Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2018-06-26T13:42:12.712Z","extensionVersion":"v2.9.2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('fetch', function (event) { | |
if (event.request.url == "https://jsonplaceholder.typicode.com/posts/1") { | |
console.log(event) | |
var init = { | |
status: 200, | |
statusText: "OK", | |
headers: { | |
'Content-Type': 'application/json' | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<h1 id="text">Heyy</h1> | |
<button onclick="getData()">GetData</button> |