pronoob
pronoob
Explore posts from servers
DDeno
Created by pronoob on 9/4/2023 in #help
Is WASM generally faster than using Deno FFI?
...
17 replies
DDeno
Created by pronoob on 8/29/2023 in #help
What is the difference between JS Map and JS Object?
I know that Map is hash table implementation for JS, but how does it differ from an object? With regards to how Python dictionaries work, there seems to be no difference.
const x = new Map();
x.set("foo", "bar");
const x = new Map();
x.set("foo", "bar");
vs
const x = { foo: "bar" };
const x = { foo: "bar" };
4 replies
DDeno
Created by pronoob on 8/17/2023 in #help
Question about for loops
Why does the following code log numbers from 0 to 9 instead of 1 to 9? i is assigned as zero in the first expression, then it checks whether i is less than 10 and moves to the next expression which is i++, so it should increment the value of i to 1 instead and log it
for (let i = 0; i < 10; i++) {
console.log(i);
}
for (let i = 0; i < 10; i++) {
console.log(i);
}
27 replies