videos, articles, and interactive coding lessons - all freely available to the public. Maintenant que nous savons ce qu'est une fonction, je vous propose de découvrir comment on peut utiliser les fonctions dans le langage que nous employons dans cette formation à titre d'exemple à savoir le JavaScript. Learn to code for free. This is something we'll soon look into.Any value that's not of a primitive type (a string, a number, a boolean, a symbol, null, or undefined) is an If you assign a variable the same value of another, if it's a primitive type like a number or a string, they are passed by value:Even arrays or functions are, under the hood, objects, so it's very important to understand how they work.The value of a property can be of any type, which means that it can be an array, a function, and it can even be an object, as objects can nest other objects.This is the object literal syntax we saw in the previous chapter:Labels can be any string, but beware of special characters - if I wanted to include a character not valid as a variable name in the property name, I would have had to use quotes around it:Invalid variable name characters include spaces, hyphens, and other special characters.As you can see, when we have multiple properties, we separate each property with a comma.We can retrieve the value of a property using 2 different syntaxes.The second (which is the only one we can use for properties with invalid names), is to use square brackets:If you access a nonexistant property, you'll get the As mentioned before, objects can have nested objects as properties:In this example, you can access the brand name usingYou can set the value of a property when you define the object.Functions can be assigned to a function property, and in this case they are called It's important to note this distinction between regular functions and arrow functions - we don't have access to This is the reason why regular functions are often used as object methods.Methods can accept parameters, like regular functions:We talked about objects, which are one of the most interesting parts of JavaScript.In this chapter we'll go up one level by introducing classes.What are classes? JavaScript is one of the most popular programming languages in the world. And if you have a single statement to execute after the conditionals, you can omit the block, and just write the statement:But I always like to use curly braces to be more clear.You attach a statement that is going to be executed if the We can initialize an empty array in these 2 different ways:An array can hold any value, even values of different types:Since we can add an array into an array, we can create multi-dimensional arrays, which have very useful applications (e.g. �X���H��@�����5��d"o��X�*}C�O��Γ�bhF�4�(ӆ��C��>6��j�=�ax���rwj�����|�J���D�%e�=g�*F �)�.�j\G�5ӷ��u�u?_��������kJ��_�BcZ�(���N�1=�D+ģ���*�n����Y��q��:w% freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as It's so popular that everything new that shows up is going to have some kind of JavaScript integration at some point.Created in 1995, JavaScript has gone a very long way since its humble beginnings.It was the first scripting language that was supported natively by web browsers, and thanks to this it gained a competitive advantage over any other language and today it's still the only scripting language that we can use to build Web Applications.Other languages exist, but all must compile to JavaScript - or more recently to WebAssembly, but this is another story.In the begining, JavaScript was not nearly powerful as it is today, and it was mainly used for fancy animations and the marvel known at the time as With the growing needs that the web platform demanded (and continues to demand), JavaScript JavaScript is also now widely used outside of the browser. Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, They are especially useful to make multiline strings much simpler.