Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const value = 10;
- const values = [5, 10, 15, 20, 25];
- console.log(value);
- const name = 'Abhi Haq';
- values.length;
- //Loop structure
- for(var i = 0; i < MAX_NUMBER; i++)
- {
- }
- //non-changeable variable
- const tamim = [30, 50, 1, 60, 50, 40];
- //changeable varbiable
- let avg_run = 0;
- //loop
- for(let i = 0; i < tamim.length; i++)
- {
- //adding all variable into one
- avg_run += tamim[i];
- }
- //output + avarage number
- console.log(avg_run / tamim.length);
- const abhi = 20;
- console.log(abhi);
- console.log('+');
- const Haq = 50;
- console.log(Haq);
- console.log('=');
- console.log(abhi+Haq);
- const abhi = 25;
- const fahim = 23;
- if( abhi > fahim)
- {
- //Abhi boro
- console.log('Abhi is elder');
- }
- else if( abhi == fahim)
- {
- //Duijon ei soman
- console.log('Both are same age');
- }
- else
- {
- //Fahim boro
- console.log('Fahim is elder');
- }
- const abhi = 25;
- const fahim = 26;
- if( abhi > fahim)
- {
- //Abhi boro
- console.log('Abhi is elder');
- }
- else if( abhi == fahim)
- {
- //Duijon ei soman
- console.log('Both are same age');
- }
- else
- {
- //Fahim boro
- console.log('Fahim is elder');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement