function createCounter() {
let count = 0;
return function() {
count += 1;
console.log(count);
};
}
const counter1 = createCounter();
counter1();
counter1();
const counter2 = createCounter();
counter2();
counter1();
What will be the output?? #javascript
๐7โค1
JAVASCRIPT GAMEDEV FULL COURSE
๐ https://youtu.be/GFO_txvwK_c
.
.
.
#javascript #gamedev #webdevelopment
๐ https://youtu.be/GFO_txvwK_c
.
.
.
#javascript #gamedev #webdevelopment
๐9
const obj = {};
let value = 0;
Object.defineProperty(obj, 'prop', {
get() {
return value;
},
set(newValue) {
value = newValue + 1;
},
configurable: true,
enumerable: true
});
obj.prop = 10;
console.log(obj.prop);
๐ดWhat will be the output??
#javascript #quiz
๐11
โ
Javascript Reduce method Example.
โซ๏ธ Finding the longest word in a given string.
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
โซ๏ธ Finding the longest word in a given string.
function longerWord(a, b) {
if (a.length > b.length) {
return a;
} else {
return b;
}
}
const sentence = 'Hey there what are you doing this Wednesday night';
const longest = sentence.split(' ').reduce(longerWord);
console.log(longest);
// Wednesday
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
๐9โค2
๐ฅ๐ฅJOIN OUR DISCUSSION GROUP๐ฅ๐ฅ https://t.iss.one/website_DesignLearning_Group
Telegram
Web development ๐discussion
web development discussion group ๐ฅ๐ฅ๐ฅ
Subscribe to get free learning resources
๐๐๐
https://t.iss.one/WebsiteDesignLearningGroup
Admin @sreetamo @Tranjar
#html #css #javascript #bootstrap #php #nodejs #webdevelopment
Subscribe to get free learning resources
๐๐๐
https://t.iss.one/WebsiteDesignLearningGroup
Admin @sreetamo @Tranjar
#html #css #javascript #bootstrap #php #nodejs #webdevelopment
โค3๐ฅฐ1
โ
Javascript Reduce method Example.
โซ๏ธ Finding the longest word in a given string.
function longerWord(a, b) {
if (a.length > b.length) {
return a;
} else {
return b;
}
}
const sentence = 'Hey there what are you doing this Wednesday night';
const longest = sentence.split(' ').reduce(longerWord);
console.log(longest);
// Wednesday
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
โซ๏ธ Finding the longest word in a given string.
function longerWord(a, b) {
if (a.length > b.length) {
return a;
} else {
return b;
}
}
const sentence = 'Hey there what are you doing this Wednesday night';
const longest = sentence.split(' ').reduce(longerWord);
console.log(longest);
// Wednesday
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
๐6๐ฅ1
This media is not supported in your browser
VIEW IN TELEGRAM
The rise and rise of #JavaScript
Forwarded from Web design & ๐ development
โ
Javascript Reduce method Example.
โซ๏ธ Finding the longest word in a given string.
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
โซ๏ธ Finding the longest word in a given string.
function longerWord(a, b) {
if (a.length > b.length) {
return a;
} else {
return b;
}
}
const sentence = 'Hey there what are you doing this Wednesday night';
const longest = sentence.split(' ').reduce(longerWord);
console.log(longest);
// Wednesday
#JavaScript
(๐) โข @WebsiteDesignLearningGroup
โค12๐3
Javascript for Everything:
JS + React = Web Development
JS + Three.js = 3D Visualization
JS + Angular = Web Applications
JS + Phaser = Game Development
JS + Vue.js = Progressive Web Apps
JS + TensorFlow.js = Machine Learning
JS + Node.js = Server-Side Development
JS + Electron = DesktopApp Development
JS + React Native = MobileApp Development
#javascript
JS + React = Web Development
JS + Three.js = 3D Visualization
JS + Angular = Web Applications
JS + Phaser = Game Development
JS + Vue.js = Progressive Web Apps
JS + TensorFlow.js = Machine Learning
JS + Node.js = Server-Side Development
JS + Electron = DesktopApp Development
JS + React Native = MobileApp Development
#javascript
๐ฅ7โค1