salut in javascript

To say "hello" or "salut" in JavaScript, you can create a function that logs a message to the console. Here's an example:

index.tsx
function saySalut(name) {
  console.log("Salut " + name + "!");
}

saySalut("John"); // Output: Salut John!
108 chars
6 lines

In this example, the saySalut function takes a name parameter and logs a message to the console using string concatenation. You can call this function with the desired name as an argument to print a salutation to the console.

gistlibby LogSnag