Objects and Functions

Objects and functions are special because ​I can manipulate them from my
code​. For example, I can connect them to other values.



console.log(x => x * 2);

“try…catch” syntax

No matter how great we are at programming, sometimes our scripts have errors. They may occur because of our mistakes, unexpected user input, an erroneous server response, and for a thousand other reasons.

try-catch construct has two main blocks: try and then catch:

try { // code… }

catch (err) { // error handling }

It works like this:

1.What is JavaScript?

JavaScript is a client-side and server-side scripting language inserted into HTML pages and is understood by web browsers. JavaScript is also an Object-based Programming language

2.What are the key features of javascript?

JavaScript is a scripting language. JavaScript is an interpreter-based scripting language. JavaScript is case-sensitive. JavaScript is an object-based language as it provides predefined objects. Client-side JavaScript is very fast because it can be run immediately within the client-side browser.JavaScript is relatively simple to learn and implement.

3. What are JavaScript Data Types?

Following are the JavaScript Data types:

4.Check a…

1.React JSX

JSX stands for JavaScript XML.JSX allows us to write HTML in React JSX makes it easier to write and add HTML in React.

You are not required to use JSX, but JSX makes it easier to write React applications.

Let us demonstrate with two examples, the first uses JSX and the second does not:


const myelement = <h1>I Love JSX!</h1>;ReactDOM.render(myelement, document.getElementById('root'));

Without JSX:

const myelement = React.createElement('h1', {}, 'I do not use JSX!');ReactDOM.render(myelement, document.getElementById('root'));

2.React Components

React components are javascript functions.It is reusable bits of code. We can say the component is a blueprint or template. Components are two…


The trim() method removes whitespace from both sides of a string.

var str = “ Hello World! “;


The slice() method extracts parts of a string and returns the extracted parts in a new string.

let str = ‘The morning is upon us.’
str.slice(-3) // returns ‘us.’
str.slice(-3, -1) // returns ‘us’
str.slice(0, -1) // returns ‘The morning is upon us’


This function converts a string Character to Lowercase Character.

const sentence = ‘The quick brown fox jumps over the lazy dog.’;
// expected output: “the quick brown fox jumps over the lazy dog.”


Split a string into…

Nadim Mahmud

My name is Nadim Mahmud. I am a software developer with extensive knowledge in programming, web development, mobile development, and database design.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store