pull/1/head
Patrick Njuguna 6 years ago committed by GitHub
parent 5a3f62bc80
commit 347b3c7935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,7 +109,7 @@ Windows:
Ctl+Shift+I Ctl+Shift+I
``` ```
#### Console.log #### Console.log
To write our first JavaScript code we used a builtin function **console.log()**. We passed an argument as an input data and the function display the output. We passed 'Hello, World' as input data or argument in the condole.log() function. To write our first JavaScript code we used a builtin function **console.log()**. We passed an argument as an input data and the function display the output. We passed 'Hello, World' as input data or argument in the console.log() function.
```js ```js
console.log('Hello, World!') console.log('Hello, World!')
``` ```
@ -295,7 +295,7 @@ External Script in the body
Open the browser console to see the out put from the console.log() Open the browser console to see the out put from the console.log()
## Multiple External scripts ## Multiple External scripts
We can link multiple external JavaScript files to a web page. We can link multiple external JavaScript files to a web page.
Create helloword.js file inside 30DaysOfJS folder and write the following code Create helloworld.js file inside 30DaysOfJS folder and write the following code
```js ```js
console.log('Hello, World!') console.log('Hello, World!')
``` ```
@ -399,9 +399,9 @@ Variables are _containers_ of data. Variables _store_ data in a memory location.
For a variable which changes at different time we use _let_ but if the data doesn't change at all we use _const_. For example PI, country name, gravity do no change and we can use *const*. For a variable which changes at different time we use _let_ but if the data doesn't change at all we use _const_. For example PI, country name, gravity do no change and we can use *const*.
A JavaScript variable name shouldn't begin with a number A JavaScript variable name shouldn't begin with a number.
A JavaScript variable name does not allow special characters except dollar sign and underscore. A JavaScript variable name does not allow special characters except dollar sign and underscore.
A JavaScript variable name follow a camelCase convention. A JavaScript variable name follows a camelCase convention.
A JavaScript variable name shouldn't have space between words. The following are valid examples of JavaScript variables. A JavaScript variable name shouldn't have space between words. The following are valid examples of JavaScript variables.
Valid variables in JavaScript: Valid variables in JavaScript:

Loading…
Cancel
Save