This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// declare an array with const | |
const arr = [1, 2, 3]; | |
console.log(arr) // [1, 2, 3] | |
// try to re-decalre an array with the same name and cought an error | |
let arr = [2, 3, 4]; // SyntaxError: Identifier 'arr' has already been declared | |
// but you can change the value | |
arr.push(4); | |
console.log(arr); // [1, 2, 3, 4] |
যারা নতুন ওয়েব ডেভেলপমেন্ট শিখতে চাচ্ছেন তাদের জন্য গাইডলাইন
✔ 1. একদম কিছু না জানলে আমাদের বেসিক টিউটোরিয়ালগুলো দেখুন। যেগুলোর লিংক: here
✔ 2. এরপর আপনাকে বুটস্ট্রাপ শিখতে হবে। এই জন্য আপনি প্রথমে w3schools থেকে বুটস্ট্রাপের বেসিক শিখুন।
✔ 3. তারপর বুটস্ট্রাপের ডকুমেন্টেশন পড়ে বুটস্ট্রাপের আরও বেশি শিখুন। মোটামুটি বুটস্ট্রাপ শেখার পরে আপনি ১৫০+ সেকশন কোর্সটি করার জন্য প্রস্তুত।
️ 4. ১৫০+ সেকশন কোর্সটি: hereসাথে
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const add = (x, y) => (+x) + (+y); | |
const subtract = (x, y) => (+x) - (+y); | |
const multiply = (x, y) => (+x) * (+y); | |
const divide = (x, y) => (+x) / (+y); | |
// Input validation function | |
const validateNumbers = (x, y) => { | |
if (isNaN(x) || isNaN(y)) { | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const assert = require('assert'); | |
const operations = require('./operations'); | |
// Below test cases for input validation | |
it('indicates failure when a string is used instead of a number', () => { | |
assert.equal(operations.validateNumbers('beauty', 10), false) | |
}); | |
it('indicates failure when two strings is used instead of numbers', () => { | |
assert.equal(operations.validateNumbers('Jamal', 'Beauty'), false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Number input validation function | |
const validateNumbers = (x, y) => { | |
if (isNaN(x) || isNaN(y)) { | |
return false; | |
} | |
return true; | |
} |