-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.js
44 lines (34 loc) · 874 Bytes
/
variables.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Varriables
// var, let, const
// var //var is a global scope
var yourName = "ANuj";
var $class = 12; //used in JQuery
var _school; //used in oops
console.log(yourName, $class, _school);
// const
const ownersName = "Anuj Khadka";
console.log(ownersName);
const array = [1, 2, 3, 4, 5, 6];
array.push(7);
// array=[100,99,98,97]
console.log(array);
// let
city = "Kathmandu";
{
let city = "Pokhara"; //let is a local scope
console.log(city);
}
console.log(city);
// Some Common Programming Type Cases:
var camelCase = "camelCase";
var PascalCase = "PascalCase";
// var kebabcase= ("Kebab-case");
var snake_case = "snake_case";
var UPPER_CASE_WITH_SNAKE_CASE = "UPPER_CASE_WITH_SNAKE_CASE";
console.log(
camelCase,
PascalCase,
"kebab-case",
snake_case,
UPPER_CASE_WITH_SNAKE_CASE
);