
1K damage~ Ben be smacking those fishes in Port Town.
#WizDaphneAdventureMemories
1
89
Holy shit this is a game changer
htmlrev.com is the best choice to find HTML templates and UI components.
Built by @webdevluc.
Check it out!
44
Day 69: String Primitives and String Object
This is string primitive
const str1 = "Hello";
const str2 = String("World");
const str3 = `Ed`;
console.log(typeof str1, typeof str2, typeof str3); //true true true
const str4 = new String("...");
comsole.log(typeof str4); //object
1
42
Day 68: Learn the better way to handle errors at fetching API.
Instead of using try catch block we can always use ?= Operator.
Explanation at the comments.
#javascript
4
1
36
After looking from the first comment, this is how we use with ?= Operator.
const [error, data] ?= await fetch(link).json();
if(error) {
console.log(error);
} else {
console.log("Data succesfully fetched: ", data);
}
This will do the same of the first comment function
22
This is the usual function to fetch api link
async function fetchData() {
const res = await fetch(link);
try {
const data = await res.json();
return data;
}
catch(err) {
console.log("Error: ", err);
}
}
22
Day 67: Learn about the XOR operation
The XOR operation commonly used in algorithm to specify unique values.
XOR operation will return 1 if the values are different, but if it's the same it will return 0.
for ex:
5 ^ 5 = 0
5 ^ 0 = 5
14


















