TAMMY LAM

What are JavaScript conditionals ?

In JavaScript conditions are used for a block of code to be true, but if the block of code is false, it will execute another block of code. To use conditions in JavaScript we use if…statements and else if…statement.

Let’s review the review the syntax of if…statement

Let review an example how to use an if… statement

--

--

What are JavaScript Objects?

What are objects?

Objects are use in JavaScript. Objects store values. these can store any type of data as values. The store value can be any value such as a string, number, an array, or even a function.

How do we use objects?

Objects use the ‘keys’ to refer to the stored values. Objects are unordered collection using the key-value pairs. for example.

let person = {

name: ‘John Doe’,

age: 30,

human: true

}

name is the key, and the string ‘John Doe’ is the value. this is called the key-value pair.

How do we access the values in objects?

To access the access the value we use the bracket notation or the dot notation. for example.

person[‘name’] => ‘John Doe’

person.age => 30

For more details for JavaScript Objects follow this link

https://www.programiz.com/javascript/object#:~:text=JavaScript%20object%20is%20a%20non,example%20of%20a%20JavaScript%20object.

--

--

What is Rails?

Rails is framework that actually comes from Ruby which is why it’s called Ruby on Rails. Ruby on Rails is used for back-end application. You could definitely create a web application using only Rails and following the MVC pattern. MVC basically stands for model-view-controller. MVC divides your application into three components which would be the model, the view and the controller. MVS is beneficial in many different reasons such as wanting to succeed the asynchronous techniques and more. Overall, Rails is a really great backend application if you’re looking to build something on the server side. It is very maintainable and the best thing about Rails is when you start to build, it practically everything for you! I’ve listed below some great resources below that focuses on Rails and MVC.

MVC

Whats is Rails?

Ruby on Rails

--

--

TAMMY LAM

TAMMY LAM

Software Engineer with experience in Ruby on Rails and Javascript.