Posts by Mirian cherbo • 95 points
5 posts
- 
		3 votes2 answers92 viewsQ: What is the difference between creating a method inside the constructor or inside the prototype property?When I see other programmers' JS code some define the methods within the constructors themselves others define the methods in the property prototype such as, for example: function Mouse() {… javascriptasked Mirian cherbo 95
- 
		1 votes1 answer269 viewsQ: What are mailto parameters for and how to use them?I know the key word mailto: used in attribute href in the link is used to open the user’s email client for sending the email, but did not know that there were some extra parameters, which can be… htmlasked Mirian cherbo 95
- 
		1 votes1 answer52 viewsQ: Why do I have to click twice to create an image?function myCanvas() { var c = document.querySelector('#myCanvas'); var ctx = c.getContext('2d'); var img = new Image(); img.src = 'https://www.w3schools.com/html/img_the_scream.jpg';… javascriptasked Mirian cherbo 95
- 
		3 votes1 answer115 viewsQ: Why is my canvas not working properly?let canvas = document.querySelector('#canvas'); let ctx = canvas.getContext('2d'); ctx.fillStyle = 'green'; ctx.fillRect(10, 10, 50, 50); #canvas { width: 500px; height: 500px; background: red; }… 
- 
		0 votes0 answers30 viewsQ: What is a prototype in Javascript?What is the purpose of the prototype in Javascript? when should I use it? what are the advantages and disadvantages of not using it? javascriptasked Mirian cherbo 95