Posts by Sofia Carvalho Martins • 11 points
2 posts
-
0
votes2
answers59
viewsA: Insert HTML code in Client-side form without using PHP
Javascript: const ajax = (url, cb, data) => { const xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", () => { if (this.readyState == 4 && this.status == 200)…
-
1
votes1
answer108
viewsQ: Magical python methods in javascript
Python objects have some magical methods like __init__, __str__, __eq__, __ne__, __gt__, __lt__, __ge__ and __le__. How to simulate these methods in javascript, for when I do console.log(obj) write…