Slater Community Roundup - Documentation and JS Functions


👋,

Let’s do three things in this email:

  • Welcome new users
  • Provide you a sneak peak of Slater Documentation
  • Teach you some Javascript basics.

Welcome new users! 🥳


Documentation

We’ve finished development on Slater Documentation and will be sharing it once we complete some improvements in other parts of Slater.app.

Slater Documentation lets you document your code with Slater AI. Slater Documentation should help you as the person who wrote the code but we’re adding it for two big, separate reason.

  • Slater Documentation is a gateway to the Community Library. We built a Community Library last year but the quality of the library was poor because the library metadata was inconsistent. Now, Slater AI will document your code and you can add an image.
  • Documentation is #knowcode for your clients. When you transfer your Slater project to a client, the client can understand how your code makes their website better.

JavaScript 101: Understanding Functions

Let’s demystify ‘Functions’ - a crucial aspect of JavaScript that even beginners can grasp with a little practice.

A JavaScript function is a block of code designed to perform a specific task. It’s a reusable piece of code that can be invoked (called) anywhere in your program, avoiding repetition and making your code more readable and manageable.

Here’s a simple example:

function greet(person) {
  console.log(`Hello, ${person}!`);
}

greet("Slater"); // Outputs: Hello, Slater user!

In this example, greet is the function name, the code inside the curly braces {} is the function body, and greet(); is how we invoke or call the function.

The first example is the OG function. Javascript now has additional types of functions. We won't get into the details in this email but you should know that there are several ways to write a Javascript function.

// This function is anonymous but assigned to a variable
const greet = function (person) {
  console.log(`Hello, ${person}!`);
};

// Arrow function
const multiply = (person) => {
  console.log(`Hello, ${person}!`);
}

Go to Slater and write your own function!

Until next time, happy coding.

- The Slater team


🙏 If Slater helps you create better websites, please support the team behind it.



1295 Canyon View Rd, Midway, UT 84049
Unsubscribe · Preferences

Welcome To Slater!

Slater resources, updates and community activity

Read more from Welcome To Slater!

We're back from a company-wide summer pause (or winter pause for our Southern Hemisphere team members). Edgar Allan is hitting it's numbers! Let's look at some new Community Library scripts: 👀 Dynamically loads HTML content based on a random number. This is a quick script we wrote to give a dynamic intro into a soon-to-be-released https://edgarallan.com. https://slater.app/community_library/random-content-aee7f7f2-3ab8-4e6f-887e-ea54cad0ebbf From Jared Malan ✍️ Create a variable for your...

We're rolling into a holiday week in the US. If you need an animated American flag to celebrate, look no further. But! We have users from all over the world. For those outside of the US, try updating the code to make an animated flag of your country (hint: use AI). If you make one, please share. We'll get it added to the Community Library. 🇺🇸 Render and animate an American flag on a canvas with dynamic waving effects....

We're adding new community library scripts each week. Let's take a look at some of them. 👾 An interactive swarm Create a dynamic grid of squares that react to mouse movement, simulating a swarm-like effect (is it a swarm?). This code is the scaled back version of something we did for a client. We'll show you the finished experience once that projects launches. Play with the example: https://slater-original.webflow.io/swarm Review the code:...