Category : properties

I am trying to write a code in which I can put view and the size of the party to find available campsites. You can see a screenshot of the instruction below the code I wrote here: function campView(campgrounds) { return campgrounds.view; } function campPartySize (campgrounds) { return campgrounds.partySize; } function findMyCampsites(campgrounds, campView, campPartySize) { ..

Read more

I wanted to test how I can avoid adding the same object twice to my array. However when I’m running this code I get the message: C:UsersnotizDocumentsReposEK_InfoManagementtest.js:6 if (temp[i].art.includes(test[i].art)) { TypeError: Cannot read property ‘art’ of undefined var temp = [{ art: ‘1234’, msg: ‘test’ }, { art: ‘6545’, msg: ‘blab’ }]; var same = ..

Read more

In https://codesandbox.io/s/rmh2n?file=/src/components/NestedDraggable.vue , in: <template> <draggable class="dragArea" tag="ul" :list="tasks" :group="{ name: ‘g1′ }"> <li v-for="el in tasks" :key="el.name"> <generic-item :taskItem="el"> </generic-item> <p>{{ el.name }}</p> <nested-draggable :tasks="el.tasks" /> </li> </draggable> </template> why isn’t generic-item rendering el? GenericItem: <template> <div v-if="taskItemLocal[‘itemSectionCategoryId’]"> <p> Section: {{taskItemLocal[‘itemSectionCategoryName’]}} </p> </div> <div v-else-if="taskItemLocal[‘itemSectionCategoryItemId’]"> <p> Item: {{taskItemLocal[‘itemSectionCategoryItemName’]}} </p> </div> <div v-else> Not set ..

Read more

In the following code import { useMsal } from "@azure/msal-react"; function ProfileContent() { const { instance, accounts } = useMsal(); const name = accounts[0] && accounts[0].name; JavaScript has no problem with this, and the code works as expected. But when I make this a TypeScript file, I get errors that Property ‘name’ does not exist ..

Read more