Let’s see some facts:
You cannot use
src and the codes in a single
<script> tags like below:
<script src="script.js"> alert("Hello"); </script>
We can omit semicolon at the end when there exists a line break, however, in some cases it may not be true. For example in the following code, you will get an error:
alert("This is an alert") ["Hello", "World"].forEach(alert)
use strict only works at the top of the code, or the function body. This code makes the script work the modern way. We cannot revert to old code if we use it once.
Not a Number after the operation.
null is an object, whereas
undefined is undefined.
typeof x? You can use the both.
You can test some mathematical operations:
alert("10"/"2"); // 5 alert(1 + "2"); // 12 alert("1" + 2); // 12 alert("1" + 2 + 3); // 123 alert(1 + 2 + "3"); // 33
+ before a string tries to convert it into numbers. e.g.
+"22" gives us a number 22. Moreover you can try,
+"", and see the result.
|| finds the first true value and AND
&& finds the first false value, otherwise last true value. For instance:
result = false || "Hello" || ""; // "Hello" result = true && "Hello" && ""; // ""
Furthermore, if you want to look into how to deploy
django in heroku, you can follow the post here: https://nepcodex.com/2019/07/deploy-django-app-to-heroku-full-guide/
Similarly, you can check this link here if you want to know about data structures: https://nepcodex.com/category/programming/data-structures/. I have got them in examples.