This repository contains the problem statements and my solutions to the udemy course by Maximilian Schwarzmuller for learning Javascript.
Here is a course link.
Problem statements for assignment 1
- Create two variables: One that holds a fictional user input (a number of your choice) and one that holds no value initially (e.g. "result").
- Set the result variable to 18 plus the value stored in user input.
- Add three additional lines of code where you change the result variable again (by subtracting a value of your choice, multiplying it and dividing it).
- Think about the value stored in the user input variable you also created - did that value change?
-
alert()
the result and the user input variables (in two separatealert()
calls).
Problem statements for assignment 2
-
Create two new functions: One that takes no parameters and simply shows
an
alert()
with some text of your choice and one that receives a name as a parameter and then usesalert()
to output that name. - Call both functions directly from your code.
-
Add an event listener to
task3Element
and attach it to the first function (the one without arguments). Click this task thereafter to verify whether it works. - Add a brand-new function that takes three parameters (three strings, give them any names you want) that returns one combined string (where the three strings are concatenated).
-
Call that new function directly from your code and
alert()
the result of that function.