Posts by Heber Leonard • 37 points
4 posts
-
2
votes0
answers36
viewsQ: What is the difference between defining an object property as a function or already passing the direct parentheses?
What is the difference between store and store2 properties? const MyObject = { store1(req, res) { console.log(req, res) }, store2: function(req, res){ console.log(req, res) } }…
-
0
votes0
answers206
viewsQ: How does span element spacing work?
Depending on how I write the code, the span element puts a spacing. <div style="padding:20px; border:1px solid black; margin-bottom:16px;">…
-
-1
votes1
answer30
viewsQ: Draw on canvas no matter the position of the canvas
I have this code that makes me able to draw lines on the canvas: https://jsfiddle.net/475yesLw/ const canvas = document.createElement("canvas"); canvas.setAttribute("id", "canvas");…
-
1
votes1
answer42
viewsQ: Align the contents of the div to the center, but the texts are on the left
I have this code. I want the text to stay centered on the div, but with the alignment on the left. I put a text-align:left, but the text is still centered. <div style=" width:1000px;…