MyDailyLearn开源项目

我要开发同款
匿名用户2021年11月10日
47阅读
开发技术JavaScript
所属分类云计算、云原生
授权协议Readme

作品详情

MyDailyLearn

HereissomeimportantcommandsorcodesnippetsondifferenttopicsthatIamlearninginmydevelopinglife.

TableofContentsMyDailyLearnTableofContentsGitJavaScriptVanillaJavaScriptVueNodeReactAngularGulpUnitTestingDockerGitConfiguregitConfigfilelocationsConfigureuser'sname&emailVariousimportantconfigcommandsBranchingCreatenewbranchDeletebranchQuickswitchbacktopreviousbranch/commit-sha/referencesetc.BranchlistingRenameabranchTracknewbranchCheckoutbranch/commit-sha/references/etc.(goforward/backward)Add,Commit,Amend,Pull,Push,Merge&DeleteCheckoutforward/backwardCherryPickStashingLoggingShow-moreloggingRecoveryorResetResetusingreflogSquashRebaseChangetheauthorofanearliercommitChangethecommitmessageofanearliercommitReorderingcommitsusingrebaseRebaseoptionsWorkingwithremotesConflictse.g.Mergingreleasebranchintomasterandwehave3foldersfoo/,bar/,js/.Nowwanttoresolveconflictssuchasfoo/,bar/shouldlikemasterandjs/shouldlikereleasebranch.GitSubmodulesSomeimportantoperationsCleanupgarbageinremoterepositoryPruneemptycommitsCreateanewWorkTreeandworkparalleyinthesamerepo(diffeentbranch)Addasigned-off-byfieldinacommitHowtotellgittoignorelocalchanges(alreadytrackedbygit)?GenerateaGitHash(SHA1)forspecificcontentsTagandReleasesFancyCommandsConceptsTrackedvsUntrackfileGitHubvsGitCommitObjectThreeareaswherecodelivesThreetypesofgitReferencesDifferenttypesofHEADTheSevenRulesofaGreatGitCommitMessageDifferencebetweenHEAD~andHEAD^JavaScriptVanillaJavaScript

Hoisting

ExplainHoistinginJavaScriptWhyHoistingImportant?First,memoryissetasideforallnecessaryvariablesanddeclaredfunctionsFunctionExpressionsareneverhoisted!TheyaretreatedasassignmentsCheckifreturnstatementisatthetopAnalyzingHoistingLoadOrderIAnalyzingloadorderIIAnalyzingLoadOrderIIIThevariablesdeclaredwithletorconstarehoistedbutstayuninitialised

Closure

ClosuresandReferencesClosuresHelpinFunctionConstructionZonesLoopswithClosure:AcautionaryTale

PrototypesandInheritance

Prototypes!WhatisConstructorcall?Whatis[[Prototype]]andwheredoesitcomefrom?Howdoes[[Prototype]]affectthebehaviorofanobject?Whatisthe3differentwaystofindwhereanobject[[Prototype]]linkedto?Discuss:__proto__,[[Prototype]],prototypeTwomechanismalwaysexistsinJavaScirpt--LexicalScopes&PrototypeChainObjectOrientedinJavaScriptExplanationofPrototypeWhenaninheritedfunctionisexecuted,thevalueofthispointstotheinheritingobject,nottotheprototypeobjectwherethefunctionisanownpropertyNewobjectusingObject.create()(ES5)NewobjectusingclasssyntacticalsugarSimilarinObjectpatternUsehasOwnProperty()toknowifthepropertyexistsasit'sownpropertyPrototypeshadowingAvoidShadowingObjectLinkedOLOO(ObjectLinkedtoOtherObject):delegatedobjectsConverttheabovecodestoOLOOClassinES6DifferentwaystocreateobjectsandtheresultingprototypechainDigintosomeexamplesfromMDNNotesWehavetocallsuperfirstinconstructor

Coercion

ExplainCoercioninJavaScriptwithexamples

Class

PublicclassfieldsPrivateclassfieldsPublicandstaticproperties

JavaScriptthiskeyword

Howdoesthiskeywordchangeindifferentcontext?1.thisinGlobalContext2.thisinObjectConstructor3.thisinanObjectMethod4.thisinaSimplefunction5.thisinaArrowfunction6.thisinEventlistenerDefaultRulesHardBindingofthisPriorityofthisbinding(top->bottom:hight->low)

ImmediatelyInvokedFunctionExpression(IIFE)

EventLoop

UnderestingAsynchronousJavaScript---EventLoopExample1Example2Example3:CallbackHell

JavaScriptReactivityUsingObject.defineProperty()

JSQuestionsandAnswers

Whatisasynchronousprogrammingandwhyisitimportant?ExplainEventDelegationDescribeEventBubblingWhatarebenefitsofnamedfunctionoveraanonymousfunctionDifferencebetweentargetvscurrentTargetWhatisFactoryFunction?Difference:null,undefinedandundeclared?WhatdoesJavaScriptgetandgetterkeyworddo?DefineagetteronnewobjectsinobjectinitializersDefiningagetteronexistingobjectsusingdefinePropertyUsingacomputedpropertyGetvsdefineProperty()WhatisthetwoconditionsofbeingModule?HowtogetUniquevaluesofanArray?HowtoremoveallfalsyvaluesfromanArray?HowtocreateanEmptyObject?Howtorequirefunctionparametersbyforce?HowtogetQueryStringParameters?WhatisDebouncinginJavaScript?Howtodeterminewhatshouldbethethiskeywordvalue?ConvertastringtospinalstringWhattypeofScopingRule(s)doesJavaScripthave?Whatare3differentwayswecancreateanewScopedvariable?Whatarethefourthingsthenewkeywordactuallydoeswhenweputinfrontofafunctioncall?Whatisthedifferentbetweenundeclaredandundefined?WhatistheonlyvalueinJSthatisnotequaltoitself!?Whatdoeshappenwhenwedeclareavariablewithvarandlet?Compare:null,undefiend,NaNImplementanEventEmitterthatsupportsstandardoperationsHowtoWriteOptimizedJavaScript?VueWhatisVue.js?InstallingKnownOptionsforVueInstanceKeySentencesForLoopBindAttributeandClassNameDynamicComponentsPreventDestroyingcomponentswhenrenderingDynamiccomponentsLazyLoadingOff-screenComponentsDisableRe-renderingwithv-onceOutputRawHTMLwithv-htmlDirectivesGetEventDatafromtheEventPassOwnArgumentswithEventObjectModifyingandEventwithModifiersListeningtoKeyboardEventsWriteJavaScriptCodeintoTemplateUsingTowWayBindingv-model="variable"TwoWayBindingfromChildtoParentReactingtoChangingwithComputedPropertiesDynamicStylingwithCSSClassesSettingStylesDynamicallywithoutCSSClassesStylingElementswithanArraySyntaxConditioningRenderingwithv-if/v-elseAlternativeofv-ifusing<template>Usev-showifwedon'twanttodetachelementfromDOMRenderingListswithv-forUseofv-forwith<template>LoopingthroughObjectsLoopingthroughaListsofNumbersKeepingTrackofElementsWhenusingv-forAccessTemplatefromVueModulebySettingaRefMountingaTemplateVueJSinstanceLifeCyclePassHTMLContentfromParenttoChildUsing<slot>HowDirectivesWorksHTML5HistoryModeDifferenceBetweenv-modelandv-bindVuexServiceWorkerCachingConfig-ProgressiveWebAppTogglingSimilarElementsVueObservable-AlternatetoVuexVueRouterhas3TypesofGuardsVueFiltersDefineLocalFilterDefineaGlobalFilterChainedFilterFilterwithArgumentsMixinVueCheatSheetsVuexCheatSheetsShortcutsInitialRenderVirtualDOMRuntime+Compilervs.Runtime-onlyCompileTemplatesinClientManuallyReactivityinDepthReactivityinsideComputedPropertiesParent-childCommunicationReactWhatisReactInstallingUseDefaultPropsUsePropTypestoDefinethePropsWeExpectUnderstandingReactsetStateUpdateaStatePropertyPassingaFunctiontosetState()AccessPreviousStateusingUpdaterStatelessFunctionComponent,StatelessComponentandStatefulComponentCompound,UncontrolledandControlledComponentsCompoundComponentUncontrolledComponentControlledComponentReactFragmentReactAppLife-cycleWalkthroughUnderstandContextAPIReferencingContextinStatelessFunctionalComponentsHigherOrderComponentAlternativeStateInitializationReduxvsContextAPILifeCycleHooksorMethodsResandtheDOMWhentoUseRefsCreatingRefsAccessingRefsUseCallbackonImageLoadwithRefReactRouteFamiliarwithVariousReactRouterLibrariesHowtoNotNavigationwithReactRouterThree(3)TypesofRouterReactPortalsUsageofPortalsReactQuestionsandAnswersHowtoPreventfromre-rendering?WhentoUseComponentInsteadofPureComponent?Whatistherenderprops?ReactUnitTestsvsIntegrationTestsforComponents?MigrationfromClasstoFunctionComponentNodeAngularGulpUnitTestingDockerDockerInstall(latestoraspecificversion)RundockerasdaemonRemoveallcontainersRemoveallimagesRunanimageprintlogofacontainerExecacontainerRunimagewithbindingport
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论