Jump to content

Everyone is using chatgpt at work


Recommended Posts

Posted
14 minutes ago, Pahelwan2 said:

Can it write sort filter map reduce code in typescript

Yes, tried it.

Posted
1 hour ago, Pahelwan2 said:

Can it write sort filter map reduce code in typescript

easy ga…

but you should use it for bigger purpose…

i recently used it for…how to create Apollo client to accept multiple http graphql endpoints (bith http and web socket) dynamically using Apollo split..

first it gave me bit bad code …later i asked to optimize…it gave me good one…i took that approach…(not copied entirely..)

  • Upvote 2
Posted
1 hour ago, Rushabhi said:

Maaku banned for work. Only entertainment/experimentation  ki vadochu

 

1 hour ago, *Prince Charming said:

Banned for us at work

Y

Posted
19 minutes ago, JaiBalayyaaa said:

 

Y

Risk of sensitive code getting exposed

  • Upvote 2
Posted
31 minutes ago, dasari4kntr said:

easy ga…

but you should use it for bigger purpose…

i recently used it for…how to create Apollo client to accept multiple http graphql endpoints (bith http and web socket) dynamically using Apollo split..

first it gave me bit bad code …later i asked to optimize…it gave me good one…i took that approach…(not copied entirely..)

I am surprised they are allowing at your workplace. Financial domain kadha

Posted
4 minutes ago, Rushabhi said:

I am surprised they are allowing at your workplace. Financial domain kadha

i accessed it in my mobile...not in office network...

thats why i told...i took the approach...not code..

Posted
2 hours ago, Pahelwan2 said:

Can it write sort filter map reduce code in typescript

In TypeScript, you can use the `sort`, `filter`, `map`, and `reduce` methods to manipulate arrays. Here's an example that demonstrates how to use these methods:

```typescript
let numbers = [4, 2, 5, 1, 3];

// Sort the numbers in ascending order
let sortedNumbers = numbers.sort((a, b) => a - b);
console.log(sortedNumbers); // [1, 2, 3, 4, 5]

// Filter out odd numbers
let evenNumbers = numbers.filter(x => x % 2 === 0);
console.log(evenNumbers); // [2, 4]

// Square each number
let squaredNumbers = numbers.map(x => x * x);
console.log(squaredNumbers); // [16, 4, 25, 1, 9]

// Sum all the numbers
let sum = numbers.reduce((acc, x) => acc + x);
console.log(sum); // 15
```

  • Haha 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...