teleren/devto huggingface dataset:
Peasy way to Show Alerts in Laravel Livewire
Tags: laravel, livewire, javascript, alerts
Published: 2020-09-30 14:32:17

###What we will achieve 
![](https://media.giphy.com/media/3UAhtuLJG3UBU4EdRu/giphy.gif)

### Note
This article assumes that you know the basics knowledge of the [Laravel](https://laravel.com/) and [Livewire package](https://laravel-livewire.com/).  

### Why
We are going to show Alert messages in Laravel Livewire. If you have little work experience with Livewire you may feel that showing alerts are not easy in the Livewire approach. Also, [Laravel notify](https://github.com/mckenziearts/laravel-notify) and [Laravel Sweetlert](https://github.com/realrashid/sweet alert) not working. Because these libs are request based while Livewire does not use the traditional Laravel request cycle. 

### Approach
Here I up came with different and easy alerts setup. For alerts, I'm using a javascript [toastr](https://github.com/CodeSeven/toastr) library. 

### Code
Assuming you have a base layout added necessary javascript and CSS. In the base layout, we have to catch an event dispatched by Livewire, See the script section.  

**app.blade.php**

```
<!DOCTYPE html>
<html>
<head>
   <title>Laravel Livewire Alert</title>
   <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" rel="stylesheet">
   @livewireStyles
</head>
<body>
 @livewire('addPost')  // adding livewire component 


 @livewireScripts
 <script 
 src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/lates 
  t/toastr.min.js"></script>
 
<script>
window.addEventListener('alert', event => { 
             toastr[event.detail.type](event.detail.message, 
             event.detail.title ?? '') toastr.options = {
                    "closeButton": true,
                    "progressBar": true,
                }
            })
 </script>

</body>
</html>
```

**add-post.blade.php**

```
 // other form element 
   ...
 <button type="button" wire:click="save">Save</button>
```

**AddPost.php**

```
 public function save()
  {
    // validation 
    ...
    // save
    ....

    // show alert
    $this->dispatchBrowserEvent(
    'alert', ['type' => 'success',  'message' => 'Saved']);
  }
```

### Summing up
So, we have addPost component, in the blade file on save or on any button click method we dispatch a browser event from the Livewire PHP component, 
We are catching this component in Javascript from base Layout and showing toaster using toastr library you can use other libraries like [SweetAlert](https://sweetalert.js.org/guides/)

That's it! Thanks for reading. If you have a question or need source code for the above tutorial please comment below. 

<span>Cover Image by <a href="https://unsplash.com/@imagefactory?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Colin Watts</a> on <a href="https://unsplash.com/s/photos/alerts?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Day 76
Tags: 100daysofcode
Published: 2020-09-30 14:20:52

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j0nlpjphcu1vg01jaqhg.png)

Today's work was as easy as displaying a 404 when a user searches a non-existent city. This week feels like a vacation, I'm doing pretty well at bare minimums.

I learnt some more concepts from the Angular project I'm working on. I'll be updating that on the [previous post](https://dev.to/mtee/my-scanty-angular-knowledge-from-gads-project-24gi)

_That's it for day 76_
_Let's do this again tomorrow_
Portfolio Website using jekyll - No programming knowledge required
Tags: jekyll, portfolio, github, website
Published: 2020-09-30 14:20:29

Do you want a responsive, fast loading, Search Engine Optimized Website? Then read the following..

# Yes I want this!! How can I get it?

- Responsive
![portfolio-lap](https://dev-to-uploads.s3.amazonaws.com/i/wfaxnt801r0x95hmagkz.png)

![portfolio-phone](https://dev-to-uploads.s3.amazonaws.com/i/k58og8xhpqz4baxrq7am.png)

- Search Engine Optimized
![seo](https://dev-to-uploads.s3.amazonaws.com/i/7vyq3e5tqqek20exrmcn.jpeg)

If you want to see the live demo [clickme](https://rahult.in)

You can see the source code here - [portfolio-jekyll](https://github.com/rawho/portfolio-jekyll)

## Prerequisites

- [Ruby](https://www.ruby-lang.org/en/downloads/) version **2.5.0** or higher, including all development headers (check your Ruby version using `ruby -v`)
- [RubyGems](https://rubygems.org/pages/download) (check your Gems version using `gem -v`)
- [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (check versions using `gcc -v`, `g++ -v`, and `make -v`)
  
If you don't have this then install it, Its easy!!

If the above mentioned requirements are satisfied, Now you are ready to install jekyll !!

## Install Jekyll

`gem install jekyll bundler`


Once it is installed successfully you are ready to test my portfolio locally and make changes

## Instructions

- `git clone https://github.com/rawho/portfolio-jekyll.git`

- once it is cloned move in to the correct directory by `cd portfolio-jekyll`

- Then lets install all the bundles by `bundle install`
- This sometimes shows some error, then you have to do `bundle update`
- once it is done, you can type `bundle exec jekyll serve`
- This will create a server at port 4000, You can visit http://localhost:4000, there you can see the website.
How to add custom javascript to Hugo
Tags: hugo, javascript, go
Published: 2020-09-30 14:20:27

Add the following to your config.toml

```toml
custom_js = ["js/custom.js"]
```

in your head.html

```html
{{ range .Site.Params.custom_js -}}
    <link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}
```
Under static -->js 
save your custom.js file!

Rebuild
can anyone tell how a site like this can be made?
Tags: discuss, help, php
Published: 2020-09-30 14:19:02

```
https://activebacklink.com/
```
I want to create a website like this for days but I am really not getting on how can I create it without any mistakes or problems.

 - I can create everything in the front end.
- Main problem is how can I create a user authentication system that can store the purchase from a 3rd party like Paypal or this website uses razor pay.
Elixir กับตัวแปรที่เปลี่ยนแปลงค่าไม่ได้
Tags: elixir, immutable
Published: 2020-09-30 14:18:14

## ตัวแปรที่เปลี่ยนค่าได้ 

ภาษาส่วนใหญ่เมื่อกำหนดค่าให้ตัวแปรใดๆแล้ว ยังสามารถเปลี่ยนแปลงค่าของตัวแปรนั้นได้ผ่านการ assign ค่าใหม่ หรือผ่าน operator อื่นๆเช่นโค้ด Go ต่อไปนี้

```go
var num int
num = 10
num = num + 20

info := map[string]string{"name": "John"}
info["forvorite_sport"] = "Football"
```

ในภาษา Go ตัวแปรอย่างเช่น num และ info สามารถถูกเปลี่ยนแปลงค่าได้แม้จะกำหนดค่าเริ่มต้นไปแล้ว

ตัวภาษาในลักษณะนี้ไม่ได้แค่มองว่าตัวแปรแทนชื่อของข้อมูลอย่างเดียว แต่ตัวแปรคือชื่อของตำแหน่งที่เก็บข้อมูลด้วย (memory address) ทำให้เราแก้ไขค่าของตัวแปร ก็คือแก้ไขค่าในตำแหน่งข้อมูลเดิมได้ นั่นเอง

## ตัวแปรที่เปลี่ยนค่าไม่ได้

ในขณะที่ภาษาที่ตัวแปรไม่สามารถเปลี่ยนค่าได้อย่าง Elixir (หรือ Erlang) เราจะไม่ได้มองว่าตัวแปรแทนชื่อของตำแหน่งข้อมูล แต่เรามองว่าตัวแปรเป็นชื่อที่เราเอามาใช้แทนข้อมูลที่เก็บอยู่จริงๆ และโดยเฉพาะ Elixir กับ Erlang เครื่องหมาย `=` ไม่ได้สื่อถึงการ Assign ค่าให้ตัวแปร แต่เป็นการ binding คือการเชื่อมโยงชื่อของตัวแปรหนึ่ง ให้กับค่าใดๆ (และใช้ในเรื่อง pattern matching ด้วย) ตัวอย่างเช่น

```elixir
num = 10
num = num + 20

info = %{"name" => "John"}
info = Map.put(info, "forvorite_sport", "Football")
```

เมื่อเรากำหนดค่า num = 10 ใน Elixir แล้วอีกบรรทัดเรากำหนด num = num + 20 สำหรับ Elixir แล้วจะไม่ได้สนใจว่า num เป็นตำแหน่งข้อมูล แต่แค่ว่าเราได้ทำให้ num นั้นเชื่อมโยงไปหาค่าใหม่คือ 30 นั่นเอง ส่วน 10 และ 30 ตอนนี้อาจจะเก็บคนละที่ตอน runtime ก็อาจจะเป็นได้ 

ซึ่งไม่เหมือนกับ Go ด้านบน num ตอนเป็น 10 และ 30 อยู่ในตำแหน่งหน่วยความจำเดียวกันแน่นอน

ในส่วนของ info เช่นกันเมื่อเราทำการเพิ่ม key => value เข้าไปใหม่ด้วยฟังก์ชัน Map.put แล้วกำหนดค่าให้ info อีกครั้งมันคือการเชื่อมโยงชื่อ info ไปยังค่าใหม่ที่ไม่ได้สนใจแล้วว่าจะอยู่ตำแหน่งข้อมูลไหนตอน runtime

## สรุป

ถ้าเข้าใจเราก็จะพอเห็นภาพว่าตอนเป็น mutable แบบ Go เราย้ายข้อมูลเข้าหาตำแหน่งข้อมูลที่แทนด้วยชื่อตัวแปร

แต่พอเป็น immutable จะตรงข้าม ตัวข้อมูลที่เปลี่ยนไป อาจจะอยู่คนละที่เลยแล้วชื่อตัวแปรต่างหาที่ถูกย้ายไปหาค่าใหม่

อาจจะมีคำถามว่าแล้ว immutable จะไม่ทำให้ใช้หน่วยความจำเยอะเกินไปเหรอ จริงๆแล้วไม่เสมอไป เผลอๆอาจจะได้ผลลัพธ์ที่ทำให้ใช้หน่วยความจำได้อย่างมีประสิทธิภาพด้วยซ้ำ

เพราะภาษาที่รองรับ immutable ดีๆนั้นจะยกหน้าที่การจัดการตำแหน่งหน่วยความจำให้กับ runtime ของภาษา อย่าง Elixir กับ Erlang ก็ยกให้กับ ErlangVM ทำหน้าที่จัดการให้ ใช้เทคนิคที่ชื่อว่า Persistent Data Structures ช่วยให้ runtime ตัดสินใจเกี่ยวกับการทำ GC ได้ดีขึ้นมีผลต่อประสิทธิภาพตอน runtime โดยรวมด้วยซ้ำ
Animated 3d Buttons In Bulma
Tags: css, html, weeklyui, webdev
Published: 2020-09-30 14:13:52

Bulma is a popular CSS framework that is built-in Sass(CSS preprocessor) with the help of a flexbox. So here made simple Animated 3d Buttons In Bulma and also we modify button with a help of CSS.

In this element, we used Box-shadow and padding, the margin for making this element on the 3d side. Also, we used the helper class for making this element to proper alignment. Here we used only Bulma’s normal buttons and rounded buttons only. You can use any buttons like medium, large, and small with our modified buttons properties.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source Code](https://w3hubs.com/animated-3d-buttons-in-bulma/)
What's your favourite command-line tool that makes you 💯 more productive?
Tags: linux, discuss, productivity
Published: 2020-09-30 14:12:13

I started a Twitter thread on this subject and got a ton of interesting replies, and I thought it would be useful to collect it here too! 

{% twitter 1311258076675280897 %}

Leave your top choice (only one!) in the comments 👇
Export text from the video with Python
Tags: python, tutorial, showdev, productivity
Published: 2020-09-30 14:07:34


In today's post, I will show you how can you export text from the video.  We are going to use `SpeechRecognition`: This is a library for or performing speech recognition with the Google Speech Recognition API. 
Also, we will be using `moviepy` library. `MoviePy` is a Python library for video editing: cutting, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom effects. MoviePy can read and write all the most common audio and video formats, including GIF, and runs on Windows/Mac/Linux, with Python 2.7+ and 3 (or only Python 3.4+ from v.1.0). 
Let's start
```sh
import speech_recognition as sr
import moviepy.editor as me
```
We need to specified, `video_file`, `output_audio_file`, and `output_text_file`
```sh
VIDEO_FILE = "test.mp4"
OUTPUT_AUDIO_FILE = "converted.wav"
OUTPUT_TEXT_FILE = "recognized.txt"
```
The concept will be like this: the script will convert the `mp4 file` to a `wav file`, and from that file, it will output text file.
Let's do that - Extracting audio from video
```sh
video_clip.audio.write_audiofile(r"{}".format(OUTPUT_AUDIO_FILE))
```
The next thing we need to do is define the recognizer.
```sh
recognizer =  sr.Recognizer()
```
We need to import audio file for recognition
```sh
audio_clip = sr.AudioFile("{}".format(OUTPUT_AUDIO_FILE))
```
Now the magic begins - we will start the conversion to text
```sh
	with audio_clip as source:
		audio_file = recognizer.record(source)
	print("Please wait ...")

	result = recognizer.recognize_google(audio_file)


	with open(OUTPUT_TEXT_FILE, 'w') as file:
		file.write(result)
		print("Speech to text conversion successfull.")

except Exception as e:
	print("Attempt failed -- ", e)
```

This is the whole code:
```sh
import speech_recognition as sr
import moviepy.editor as me

VIDEO_FILE = "video.mp4"
OUTPUT_AUDIO_FILE = "converted.wav"
OUTPUT_TEXT_FILE = "recognized.txt"
try:
	video_clip = me.VideoFileClip(r"{}".format(VIDEO_FILE))
	video_clip.audio.write_audiofile(r"{}".format(OUTPUT_AUDIO_FILE))
	recognizer =  sr.Recognizer()
	audio_clip = sr.AudioFile("{}".format(OUTPUT_AUDIO_FILE))
	with audio_clip as source:
		audio_file = recognizer.record(source)
	print("Please wait ...")
	result = recognizer.recognize_google(audio_file)
	with open(OUTPUT_TEXT_FILE, 'w') as file:
		file.write(result)
		print("Speech to text conversion successfull.")
except Exception as e:
	print("Attempt failed -- ", e)
```

**Note**
For longer videos, you can split audio data into chunks.

This is the video that I use for testing purposes: [video](https://streamable.com/ovw7ji).
The video is originally uploaded to Youtube and you can find it here: [Youtube link](https://www.youtube.com/watch?v=npgVq7-Fioo&ab_channel=onelove).

***Thank you all*.**
WayScript Teams Feature Launch
Tags: startup, wayscript
Published: 2020-09-30 14:05:04

Build Apps Faster with Collaboration
------------------------------------

Here at WayScript, we're excited about the launch of the new teams feature! With teams, you'll be able to work alongside others on your team to build and execute apps, all in the cloud! This is another step in achieving the best experience for you as we continue to build a platform with unlimited potential. What functionality comes with teams? Let's see!

Invite Others to Join your Team
-------------------------------

We work to make WayScript as powerful as possible. With usage scaled infrastructure, programming language integrations, and powerful modules, we want to provide a platform that can handle any need. With such a variety of use cases, collaboration with others is a must. With teams, we strive to make it easy for you to invite others and immediately begin sharing resources.  
  
To invite others to your team, click the '+' icon on your profile page:

![Add team member](https://wayscript.com/blog_img/137/2.png)

Once here, we can pass in an email address which is registered to WayScript to see and confirm the profile name. If the user is unregistered, we'll send them an invite!

Share Scripts
-------------

Now that you're in a team or have created a team, you'll be able to access and create scripts under that team account. The scripts you create and run under the team will count towards the team's runtime and not your personal account.  
  
As a team owner, be sure to only invite trusted individuals to your team. Each member will have access to all team scripts, creating new scripts under the team, and executing scripts under the team.

Executing Team Scripts
----------------------

Like stated above, members of your team will have access to execute team scripts. Previously, to share scripts in this way was a tough interaction, especially if you were trying to share scripts with a nontechnical individual. Publicly shared scripts which are cloned come with some disadvantages at the time of writing this article. One of those disadvantages is the ability of sharing files alongside the app.  
  
With teams, the files associated to the team account can be accessed by all in the team. This makes building applications using these files with others and everyone having the ability to execute a breeze!  
  
We're working hard at improving some more core experiences around files too, so stay tuned!

Big Picture
-----------

We're excited about the teams experience. Please be sure to tell us what you think. We value your feedback in making WayScript the best it can be!

*   Team members can share resources linked to the team account, including runtime allowances.
*   An improved collaborative experience for team members, as opposed to the previous sharing features.
*   Build applications with others on your team, allowing sharing before a 'published' state is ready.

We hope you give WayScript a try!
YouTube Video | Modern ES6 - Chapter 5 - Rest & Spread operator
Tags: youtube, javascript, webdev, showdev
Published: 2020-09-30 14:04:35

In Chapter 5, we are going to learn about Rest and Spread operator.

{% youtube BiJUJoT7rKQ %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
Azure Spring Cloud: A Comprehensive Overview
Tags: cloudcomputing, azure, java, spring
Published: 2020-09-30 14:38:14

---
title: Azure Spring Cloud: A Comprehensive Overview
published: true
date: 2020-09-30 14:04:28 UTC
tags: cloudcomputing,azure,java,spring
canonical_url: https://medium.com/@domenicosibilio/azure-spring-cloud-a-comprehensive-overview-c78a3f8f4bb7
---

[![](https://cdn-images-1.medium.com/max/1000/1*qlB8yK3fj5sMhSNiyZIzfg.png)](https://medium.com/@domenicosibilio/azure-spring-cloud-a-comprehensive-overview-c78a3f8f4bb7?source=rss-299466747366------2)

In this article, you will learn about Azure Spring Cloud and its main features quickly and with ease.

[Continue reading on Medium »](https://medium.com/@domenicosibilio/azure-spring-cloud-a-comprehensive-overview-c78a3f8f4bb7?source=rss-299466747366------2)
YouTube Video | Modern ES6 - Chapter 4 - Object Literals
Tags: youtube, javascript, showdev, webdev
Published: 2020-09-30 14:03:01

In Chapter 4, we are going to learn about Object Literals.

{% youtube HOhxlZPhK_8 %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
Hactoberefest 2020 x AlgoBook
Tags: hacktoberfest, beginners, python, machinelearning
Published: 2020-09-30 14:01:58

## Hello Everyone!
Since Hacktoberfest is around the corner, we came up with a very beginner-friendly project for you all to make open-source contributions. Hacktoberfest is a month-long celebration of open source software and is open to everyone in our global community, 
organized by DigitalOcean. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/sb1ypha65ianowk0d51l.JPG)

## Overview

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q4vm4ubte9bqk6vh2vw8.png)

The goal of this project is to help beginners with their contributions in Open Source and bring all the possible algorithms of Machine Learning and Python together. We aim to achieve this collaboratively, so feel free to contribute in any way you want, just make sure to follow the contribution guidelines.

Since most of us are beginners in the field of Python and Machine Learning, why not contribute to a project that is useful to others and meaningful to all.
So our project is all about having various Algorithms in Python as well as Machine Learning Algorithms together under one roof. Have a look at it:

https://github.com/geekquad/AlgoBook


What's more? You will earn T-shirts and swags too 🥳🎉
Looking forward to having contributions from you all.
For any issues or queries, please join our Slack Channel:
https://rb.gy/rzhhod
YouTube Video | Modern ES6 - Chapter 3 - Default parameters
Tags: youtube, javascript, webdev, showdev
Published: 2020-09-30 14:01:09

In Chapter 3, we are going to learn about Default parameters.

{% youtube 2Cv_z3fXzCw %}


Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | Modern ES6 - Chapter 2 - Fat arrow function
Tags: youtube, webdev, showdev, javascript
Published: 2020-09-30 13:59:07

In Chapter 2, we are going to learn about Fat arrow function.

{% youtube 5Elq76pGqBE %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | Modern ES6 - Chapter 1 - var, let and const
Tags: javascript, webdev, showdev, youtube
Published: 2020-09-30 13:57:25

This is a premium ES6 tutorial. In Chapter 1, we are going to learn about var, let and const.

{% youtube bjZArv82fdQ %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
YouTube Video | Modern ES6 - Chapter 0 - Introduction
Tags: youtube, javascript, webdev, showdev
Published: 2020-09-30 13:54:09

This is a premium ES6 tutorial. In the introduction, we will go through the content of the course.

{%youtube __RW76AYeL4 %}

Please do like it and [Subscribe](https://www.youtube.com/channel/UCRf7mazcufqZxd2pR3oQJuQ?sub_confirmation=1) to my channel for more videos.
AzureFunBytes New Episode Reminder - 10/1/2020 2 PM EDT -  @Azure Subscriptions w/ @ExchangeGoddess
Tags: azure, beginners, tutorial, costs
Published: 2020-09-30 13:43:30

New #AzureFunBytes - 10/1/2020 2 PM 

This week we welcome back none other than the Exchange Goddess herself, [Phoummala Schmitt](https://twitter.com/ExchangeGoddess).  

Things in the cloud for the most part eventually cost money.  You're going to have to consider what is spent, how it's spent, and how you can save money long term.  Cloud infrastructure is technical, but it does require a lot of understanding of the payment methods, invoicing profiles, and cost centers for your business.  

Making your business or app work in the cloud requires time and planning when ensuring your spending is done in the most efficient way possible.  Phoummala will help us learn a bit more on how to do that.

{% youtube ZrxhG181UZw %}

AzureFunBytes! - Byte-sized content with a live Twitch show!

Learn about Azure fundamentals with me!

Live stream is available on Twitch at 2 pm EDT Thursday. You can also find the recordings there as well.

https://twitch.tv/azurefunbytes
https://twitter.com/azurefunbytes

Join me, ask questions, and learn about Azure!

[Microsoft Learn: Azure Fundamentals](https://docs.microsoft.com/en-us/learn/paths/azure-fundamentals/?WT.mc_id=blog-devto-jagord)
[Microsoft Azure: $200 Free Credit](https://azure.microsoft.com/en-us/free/?WT.mc_id=devto-blog-jagord)
[Azure Cost Management + Billing documentation](https://docs.microsoft.com/azure/cost-management-billing/?WT.mc_id=blog-devto-jagord)
Tutorial: [Create and manage Azure budgets](https://docs.microsoft.com/azure/cost-management-billing/costs/tutorial-acm-create-budgets?WT.mc_id=blog-devto-jagord)
What JavaScript features can we use with AWS lambdas
Tags: todayilearned, todayisearched, aws, node
Published: 2020-09-30 13:37:33

Most of you know that latest version of ECMAScript is [2020](https://www.ecma-international.org/ecma-262/), which brought us many very interesting features.

One of the my favourite is [optional chaining](https://v8.dev/features/optional-chaining), a feature that saves us a lot of effort when dealing with multiple nested objects that can be nullish. As per the spec proposal, “an optional chain is a chain of one or more property accesses and function calls, the first of which begins with the token ?.”.

This is, instead of a long and conditional statement like

```javascript
let result;
if (something && something.record && something.record.field) {
  result = something.record.field;
} else {
  result = "";
}
```

You have a more elegant 
```javascript
const simpleResult = something?.record?.field || "";
```

So... ready to start refactoring your old-fashined and chatty AWS lambda code with optional chaining? Stop! 🛑 Have you considered that it is a quite new feature that it may not be supported yet by the lambda AWS running engine?

The question is, **how can I know what are the JavaScript features that I can use while developing AWS Lambdas?**

The answer is simple and it takes you just a couple of clicks. Let me show you how:
1. Check what is the NodeJS version you lambdas is running on. You can see that from the AWS console, or in the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
2. Look at the greate [node.green](https://node.green/) table where you can see the features that you are looking for and its compatibility with your version of NodeJS. 

Back to my "optional chain" case, I have seen that my lambdas are running on node 12, and looking at the [compatibility table for that feature](https://node.green/#ES2020-features-optional-chaining-operator-----) I have saddly realized that it is not supported 😢. I will have to wait until AWS adds node 14 runtime. 

Meanwhile we can keep learning and figuring out how to improve our code. 

I hope this helps!

Happy learning and experimentation!