René's URL Explorer Experiment


Title: javascript2/week3 by Nebiyoutibebu · Pull Request #374 · HackYourFuture/JavaScript2 · GitHub

Open Graph Title: javascript2/week3 by Nebiyoutibebu · Pull Request #374 · HackYourFuture/JavaScript2

X Title: javascript2/week3 by Nebiyoutibebu · Pull Request #374 · HackYourFuture/JavaScript2

Description: javascript2/week3 //2.1 ======================================= function foo(func) { func () ; } function bar() { console.log('Hello, I am bar!'); } foo(bar); //2.2/ ======================================= function threeFive(startIndex, stopIndex, threeCallback, fiveCallback) { const numbers = []; // Replace this comment and the next line with your code //console.log(startIndex, stopIndex, threeCallback, fiveCallback, numbers); for (let i = startIndex; i <= stopIndex; i++){ numbers.push(i); } console.log(numbers); for (let i = 0; i < numbers; i++ ){ if (numbers[j] % 3 === 0 && numbers[j] % 5 === 0){ threeCallback(numbers[i]); fiveCallback(numbers[i]); } else if (numbers[i] % 3 === 0){ threeCallback(numbers[j]); } else if(numbers[i] % 5 === 0){ fiveCallback(numbers[j]); } } } function sayThree(number) { // Replace this comment and the next line with your code console.log(number + " is divisible by three"); } function sayFive(number) { // Replace this comment and the next line with your code console.log(number + " is divisible by five"); } threeFive(10, 15, sayThree, sayFive); // Do not change or remove anything below this line module.exports = threeFive; //2.3 ============================== // While loop function repeatStringNumTimes(str, num) { let accumulatedStr = ''; while (num > 0) { accumulatedStr += str; num--; } return accumulatedStr; } // for loop repeatStringNumTimes("abc", 3); function repeatStringNumTimes(str, num) { let accumulatedStr = ''; for (i = 0; i < 5; i++) { accumulatedStr += str; num--; } return accumulatedStr; } repeatStringNumTimes("abc", 3); // Do while loop function repeatStringNumTimes(str, num) { let accumulatedStr = ''; do { accumulatedStr += str; num --; } while (num > 0); return accumulatedStr; } console.log( repeatStringNumTimes('abc', 3)); //2.4 ============================== function Dog() { this.name = "George", this.color = "White", this.numLegs = 4; } function Dog() { this.name = "George", this.color = "White", this.numLegs = 4; } let hound = new Dog(); //2.5 ================================== function multiplyAll(arr) { var product = 1; // Only change code below this line for(let i=0; i < arr.length; i++){ for (let j=0; j < arr[i].length; j++){ product = product * arr[i][j]; } } // Only change code above this line return product; } // Modify values below to test your code multiplyAll([[100,200],[300,400],[500,600,700]]); // 2.6================================== /*if it is a 2D Array we check each index. since it is going to contain arrays too we need to check if an index is an array. we should store the resulting indeces into a result array to return. Knowing the given array will only be a 2D array, we search each index for an array, and each index that is an array, search again transfering all data to the return array. */ //2.7 ==================================== // value of x in the first function is 9 because x is called outside the function const x = 9; function f1(val) { val = val + 1; return val; } f1(x); console.log(x); /When a parameter is passed by reference, the caller and the callee use the same variable for the parameter. If the callee modifies the parameter variable, the effect is visible to the caller's variable. if you pass by by reference the change reflects outside./ const y = { x: 9 }; function f2(val) { val.x = val.x + 1; return val; } f2(y); console.log(y); 10 /but if you pass by value it makes a copy and pass it so the change will not be reflected outside. in other words When a parameter is passed by value, the caller and callee have two independent variables with the same value and if the callee modifies the parameter variable, the effect is not visible to the caller./ //3,================================== let addSix = createBase(6); function createBase(num){ return function addSix(added){ return num + added } } addSix(10); // returns 16 // Bonus===================== const letters = ['a', 'b', 'c', 'd', 'a', 'e', 'f', 'c']; let unique = [...new Set(letters)]; console.log(unique); // returns ['a', 'b', 'c', 'd', 'e', 'f',]

Open Graph Description: javascript2/week3 //2.1 ======================================= function foo(func) { func () ; } function bar() { console.log('Hello, I am bar!'); } foo(bar); //2.2/ =======================...

X Description: javascript2/week3 //2.1 ======================================= function foo(func) { func () ; } function bar() { console.log(&#39;Hello, I am bar!&#39;); } foo(bar); //2.2/ ===============...

Opengraph URL: https://github.com/HackYourFuture/JavaScript2/pull/374

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:9df24648-5ab3-788b-b2a4-8e4c4a4a42f0
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idE300:2F9F8B:144C0EB:1A86D36:69743812
html-safe-nonceda565000db4000804ce922fb8034a695ad1de85265042ed5a5ab1d1f88f46460
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzAwOjJGOUY4QjoxNDRDMEVCOjFBODZEMzY6Njk3NDM4MTIiLCJ2aXNpdG9yX2lkIjoiNzE1MjYxOTQyMzIxOTIwMDE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccc5908b852617cab28cc79e59920004a5df8267b538131280d15abd2b65d7f13
hovercard-subject-tagpull_request:289258292
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/HackYourFuture/JavaScript2/pull/374/checks
twitter:imagehttps://avatars.githubusercontent.com/u/45137309?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/45137309?s=400&v=4
og:image:altjavascript2/week3 //2.1 ======================================= function foo(func) { func () ; } function bar() { console.log('Hello, I am bar!'); } foo(bar); //2.2/ =======================...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c
turbo-cache-controlno-preview
go-importgithub.com/HackYourFuture/JavaScript2 git https://github.com/HackYourFuture/JavaScript2.git
octolytics-dimension-user_id20858568
octolytics-dimension-user_loginHackYourFuture
octolytics-dimension-repository_id124885266
octolytics-dimension-repository_nwoHackYourFuture/JavaScript2
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id124885266
octolytics-dimension-repository_network_root_nwoHackYourFuture/JavaScript2
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fe7e2e8de6e57740bca50402351ea656f7a4bf
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FHackYourFuture%2FJavaScript2%2Fpull%2F374%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FHackYourFuture%2FJavaScript2%2Fpull%2F374%2Fchecks
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=HackYourFuture%2FJavaScript2
Reloadhttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
Reloadhttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
Reloadhttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
HackYourFuture https://patch-diff.githubusercontent.com/HackYourFuture
JavaScript2https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FHackYourFuture%2FJavaScript2
Fork 327 https://patch-diff.githubusercontent.com/login?return_to=%2FHackYourFuture%2FJavaScript2
Star 19 https://patch-diff.githubusercontent.com/login?return_to=%2FHackYourFuture%2FJavaScript2
Code https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2
Issues 1 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/issues
Pull requests 22 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pulls
Actions https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/actions
Projects 0 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/projects
Security 0 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/security
Insights https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pulse
Code https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2
Issues https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/issues
Pull requests https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pulls
Actions https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/actions
Projects https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/projects
Security https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/security
Insights https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pulse
Nebiyoutibebuhttps://patch-diff.githubusercontent.com/Nebiyoutibebu
HackYourFuture:masterhttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/tree/master
Nebiyoutibebu:masterhttps://patch-diff.githubusercontent.com/Nebiyoutibebu/JavaScript2/tree/master
Conversation 0 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374
Commits 2 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/commits
Checks 0 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
Files changed https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/files
Please reload this pagehttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
Please reload this pagehttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
javascript2/week3 https://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks#top
Please reload this pagehttps://patch-diff.githubusercontent.com/HackYourFuture/JavaScript2/pull/374/checks
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.