Lesson 9 Javascript
The lesson 9 topic was all about JavaScript contained 2 parts of the video. The first part was focused on knowing what is JavaScript.
JavaScript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.
There are lots of ways on using a JavaScript some example of this are mention in the video presented by our professor like detecting the browser used by a visitor at your page and manipulating cookies.
JavaScript Commands
-JavaScript code gives instructions to the web browser.
-JavaScript commands are usually called JavaScript code.
-Each command should end with a semicolon. It helps your code be more readable to you and the browser, too.
Most programming languages give commands to the computer. However, JavaScript commands the web browser. Usually, programs contain many statements, which give instructions to the browser. In JavaScript programs, every command is executed one by one in order from top to bottom.
Since we are very familiar on a code used in C or C++ programming it is easier to understand the code by comparing them with JavaScript.
In JavaScript, arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. There are four standard arithmetic operators, addition (+), subtraction (-), multiplication (*), and division (/). The syntax are very much similar to C or C++ programming
Conditional Statement syntax of "if and else" and " and or not" are almost the same as C or C++ programming. Loops are also the same but the arrays syntax are very different.
The problem with JavaScript is when there's an error it won't show which line the syntax error while C or C++ programming will mark the syntax error line code.
In JavaScript, functions are one of the most basic building blocks. In JavaScript, a function is equivalent to a series of statements that performs a task or calculates a value, but a procedure must take some input and return an output with some obvious relationship between the input and the output to qualify as a function. You must identify a feature somewhere in the scope from which you want to call it before you can use it.
The part 2 of the lecture was all about coding. The logic it is very similar to programming 1 and programming 2 in our first year level the only difference is the commands are wrote.
Comments
Post a Comment