Answer the following questions about JavaScript. These questions may require you to do your own research to determine the best answer.
Developer Resources
JavaScript is created to enable work or chages to be done within the user's web browser , even when offline.It's ability to be used in creating high responsive interfaces and dynamic funtionality makes it convenient to be used for web maps designs and visualization
A variable in JavaScript is a container that stores data values.
A value is assigned to a specific container and can then be referenced by naming the particular container
For example, in order to declare variables for data values 'song' and 'year', var song; var year;
= assigns a value to a variable
== means equal. Checks if two values are equal or not
=== means equal value and equal type. Checks if two values are equal and have the same data type
Hello10
Because adding a number a string returns a string as a result
A for loop repeats an action for some number of times until a condition evaluates to false
It is versatile and easy to use and able to handle all manner of looping tasks
The while loop evaluates the condition and if true,the block of statements following the while statement is executed
1. The if statement- Its the most common type and used to specify a block of code to be executed if a condition is true.
2. The else statement- This is an extension of the if statement wnd adds another block of code to run when the condition of the if statement is false
3. The else if statement- It is used to specify a new condition if the first condition is false.It extends an if statement byadding another condition with its own block
Multiple if statements may be used instead of else or else if statements. By using multiple if conditions,JavaScript has to go through each condition, whereas with else and else if conditions, JavaScript has to check conditions until it finds a condition that returns value to be true.