python vs js code example
Example 1: js yield*
function* g1() {
yield 2;
yield 3;
yield 4;
}
function* g2() {
yield 1;
yield* g1();
yield 5;
}
const iterator = g2();
console.log(iterator.next());
console.log(iterator.next());
console.log(iterator.next());
console.log(iterator.next());
console.log(iterator.next());
console.log(iterator.next());
Example 2: python vs javascript
Python lets you do multiple things.
javascript for web development.
in html theres no way to use python
but there is a way to use javascript with the
<script> </script> tag