Conditional constructs

Safe navigation operator

In object-oriented programming, the safe navigation operator (also known as optional chaining operator, safe call operator, null-conditional operator, null-propagation operator) is a binary operator that returns null if its first argument is null; otherwise it performs a dereferencing operation as specified by the second argument (typically an object member access, array index, or lambda invocation). It is used to avoid sequential explicit null checks and assignments and replace them with method/property chaining. In programming languages where the navigation operator (e.g. ".") leads to an error if applied to a null object, the safe navigation operator stops the evaluation of a method/field chain and returns null as the value of the chain expression. It was first used by Groovy 1.0 in 2007 and is currently supported in languages such asC#,Swift, TypeScript, Ruby,Kotlin,Rustand others. There is currently no common naming convention for this operator, but safe navigation operator is the most widely used term. The main advantage of using this operator is that it avoids the pyramid of doom. Instead of writing multiple nested ifs, programmers can just use usual chaining, but add question mark symbols before dots (or other characters used for chaining). While the safe navigation operator and null coalescing operator are both null-aware operators, they are operationally different. (Wikipedia).

Video thumbnail

Internet Safety

If you are interested in learning more about this topic, please visit http://www.gcflearnfree.org/ to view the entire tutorial on our website. It includes instructional text, informational graphics, examples, and even interactives for you to practice and apply what you've learned.

From playlist The Internet

Video thumbnail

What Is Autonomous Navigation? | Autonomous Navigation, Part 1

Navigation is the ability to determine your location within an environment and to be able to figure out a path that will take you to a goal. This video provides an overview of how we get a robotic vehicle to do this automatically. We’ll cover what it means to have a fully autonomous vehic

From playlist Autonomous Navigation

Video thumbnail

Staysafe.org: Protect your computer

The Internet is a global network that connects us to limitless information and opportunities. But there are risks involved with connecting to the Internet, such as downloading viruses and spyware onto computers and devices. Watch this video for four easy steps to help protect your computer

From playlist awareness

Video thumbnail

Why you should actually read the URL & be careful with free Wi-Fi

What does that “HTTPS” in a URL mean? Why should you consider what Wi-Fi you’re using?

From playlist Internet Safety

Video thumbnail

Internet Safety: Your Browser's Security Features

In this video, you’ll learn more about your browser's security features. Visit https://www.gcflearnfree.org/internetsafety/your-browsers-security-features/1/ for our text-based lesson. This video includes information on: • Using browser security to check web addresses and identify securit

From playlist Internet Tips

Video thumbnail

How to stay safe online shopping

Online shopping involves sharing credit card or other private financial information. Learn how to choose secure websites to ensure that your information stays safe!

From playlist Internet Safety

Video thumbnail

GPS, How does it work? | ICT #12

GPS has already become an integral part of our lives, and you can see a few useful applications from these examples. GPS is really an interesting technology. It uses a system of 24 satellites continuously orbiting the earth, and requires at least four satellites to track your location; it

From playlist Internet & Telecommunication Technology

Video thumbnail

Engineering & Tech Overview – NASA Perseverance Mars Rover

Join engineering and technology experts on the Mars 2020 team for a live panel where they will talk about the Perseverance Mars rover's advanced landing system, teach us more about the instruments that will aid in the search for ancient microbial life and the tech demos, such as MOXIE and

From playlist Mars

Video thumbnail

Mission Control Live: NASA Lands Perseverance Mars Rover (360 video)

Watch an epic journey unfold on Thursday, Feb. 18 as our Perseverance rover lands on Mars. Watch here for a 360-degree engineer's-eye-view from inside Mission Control at NASA’s Jet Propulsion Laboratory, with picture-in-picture commentary. To reach the surface of the Red Planet, the rover

From playlist 360 Video

Video thumbnail

Watch NASA’s Perseverance Rover Land on Mars!

Watch an epic journey unfold on Thursday, Feb. 18 as our Perseverance rover lands on Mars. To reach the surface of the Red Planet, the rover has to survive the harrowing final phase known as Entry, Descent, and Landing. Only then can the rover – the biggest, heaviest, cleanest, and most

From playlist Mars

Video thumbnail

Robotics | Self-Driving Cars | The Great Courses

Learn more about this course and start your FREE trial here: https://wondrium.com/youtube/lp/t2/generic?utm_source=Video&utm_medium=Youtube&utm_campaign=149624 Investigate the fascinating field of modern robotics. In this lecture take a look at self driving vehicles and explore the trade

From playlist Latest Uploads

Video thumbnail

Why The RAF Air Tankers Are Perfect For Aerial Refuelling | The Military Tech Show | Spark

With exclusive access, this eye-opening series reveals the latest military innovations which are shaping the present and future of the armed forces. Each informative episode features must-see inventions and life-saving gadgets. Subscribe to Spark for more amazing science, tech & engineeri

From playlist Spark Top Docs

Video thumbnail

The Test Dummies Used To Train Combat Medics For Surgery | The Military Tech Show | Spark

This week, we take a look at a particularly inventive - and gruesome - test dummy used to train combat medics to deal with soldiers who have stepped on an IED. Also, an unmanned sea-drone used to find depth charges gets a field test. Subscribe to Spark for more amazing science, tech & eng

From playlist The Science Of Trains

Video thumbnail

How This Port Became The Largest Loading Port In Australia | Port Hedland | Spark

Australia is the 6th largest country in the world and home to twenty-one million people. It’s an enormous landmass with extensive resources and massive industrial operations underpinning its economy. It’s a country where big ideas are dreamt and then built. In Big Australia, each episode

From playlist Spark Top Docs

Video thumbnail

Stanford Seminar - Spatial Reasoning for Human-Robot Interaction

Marynel Vázquez Yale University May 17, 2019 Humans have an outstanding ability to reason about space and the spatial behavior of other people. This ability facilitates both implicit and explicit interactions, e.g., navigation nearby other people as well as social conversations. As mobil

From playlist Stanford Seminars

Video thumbnail

Angular 4 Forms - Part 1 | Angular 4 Form Validation | Angular 4 Template Driven Forms | Edureka

This is the seventh video of a complete angular 4 tutorial series for beginners in which you will learn all about angular forms through practical examples. Here, are the topics that will be covered in this playlist: 1) Angular 4 Introduction : www.youtube.com/watch?v=R4wGCHzn6-Q 2) Angul

From playlist Angular 4 Tutorial For Beginners [Edureka Free Course]

Video thumbnail

Does it really matter what browser I choose?

You have a choice of browsers to select from. What makes a browser more - or less - secure? Learn some ways to assess a browser's security.

From playlist Internet Safety

Video thumbnail

1964 Bunker Hill AFB B-58 Accident

The Indianapolis Star wrote on December 13, 2018: “Most people know nothing about Indiana's nuclear bomb incident." The term “Cold war” sometimes belies that fact that that war produced very real casualties. Check out our new community for fans and supporters! https://thehistoryguyguild

From playlist Nuclear near misses

Related pages

Null pointer | Elvis operator | TypeScript | Nullable type | Null coalescing operator