Day 33: Become a self-taught blockchain developer with zero knowledge in 365 days

Ximena Elizeche
2 min readMar 1, 2021

PREVIOUS: DAY 32

order 8.25: the fundamentals of Javascrpit again(coding practice)

Finally, the arragement of the learning order is done. There are totally 149 questions for me to complete. There are two main purposes for me to achieve in this part. First, I want to be familiar with most of the required syntax of Javascript. This is the basic prerequisity for me to master the programming and also for the second purpose. And the second is to be equipped with the flexible programming thinking ability. In order to achieve this two purpose, during the process of solving the quesiton, I must constrain myself not to rely on the notes, the hints, ot even the answer. The pain of writing the code from scratch without knowing how to do so is necessary, which is also the essential process to cultivate the underlying programming thinking I mentioned above. I have to carefully complie with the rule I’ve set, for it’s actually easy to violate.

Q0: browse 3.2 Coding Style , 3.3Comments , 3.4 Ninja code, 3.5 Automated testing with Mocha, 3.6 Polyfills and transpilers first

Q1: show “hello world” on the random website

<body>

<script>

alert(“hello world”);

</script>

</body>

Q2: same as Q1 but the script has to be from an external file alert.js, residing in the same folder.

<body>

<script src=”script.js”></script>

</body>

alert(“hello world”);

Q3: show “hello world” using two alerts

alert(“hello”);

alert(“world”);

Q4: show 100 but can not use 100 in the code

alert(10*10);

Q5: show “100” but can not use “100” in the code

alert(“1”+”00");

Q6: show 100 and 200 respectively but can not use more than one alert

[100,200].forEach(alert); //quite tricky systax

Q7: write an example that semicolons matter

//unable to name one on my own, just remenber to add one after the finished line

alert("I don't know")

[100,200].forEach(alert)

Q8: write an example with one line comment and multiline comments neatly.

alert(3*5);

//work 3 hours for 5 days

alert(7*24);

/* To calulate how many hours

is there per week.*/

Q9: write the arbitrary code using “use strict” mode

“use strict”;

alert(“this is the strict mode”);

Q10: use “use strict” mode in the developer console of an arbitrary website until it gets incorrect results

//not really familiar with the developer console, skip

Q11: use “use strict” mode in the developer console of an arbitrary functions of an arbitrary website

//not really familiar with the developer console, skip

Q12: create an variable with a string in two ways and show it. Then distingiush which one is better

let string1 = “1”; //the first one

let string2;

str2 = “2”; //the second one

alert(string1);

alert(string2);

/*The first one is better.

I think spilting it into two steps is unnecessary.*/

#

NEXT: DAY 35

--

--