π° Enums in JavaSript
Using these methods, you can create effective enums in JavaScript to maintain cleaner, more organized code.
Enums in JavaScript help create a set of named constants, making code more readable and manageable. Although JavaScript doesnβt have built-in enums, you can use alternatives to achieve similar functionality.
Using these methods, you can create effective enums in JavaScript to maintain cleaner, more organized code.
β€10
π° The most important Array Methods in JavaScript
map , filter and reduce
map , filter and reduce
π6β€4
π° Creating simple blob shapes in css using border radius!
Create a square element with the required dimensions, and throw in some randomness with the border-radius property to achieve a cool blob shape.
π8
π
HTML Form Input Types
The <input> HTML element is used to create interactive controls for web-based forms to accept data from the user. A wide variety of input data types and control widgets are available, depending on the device and user agent. The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.
β€7π4π₯2π1
Must know things for FRONTED DEVELOPMENT ποΈ
β‘οΈ HTML + CSS
βΆοΈ Build basic projects
β‘οΈ Git + GitHub
β‘οΈ Javascript
β‘οΈ Javascript framework
βΆοΈ Build Projects
β‘οΈ HTML + CSS
βΆοΈ Build basic projects
β‘οΈ Git + GitHub
β‘οΈ Javascript
β‘οΈ Javascript framework
βΆοΈ Build Projects
π16π₯2
How React's ES6 syntax is different from ES5 syntax?
1. require vs. Import
1. require vs. Import
// ES5
var React = require('react');
// ES6
import React from 'react';
β€5
2. exports vs. export
// ES5
module.exports = Component;
// ES6
export default Component;
β€5π1
3. component and function
// ES5
var MyComponent = React.createClass({
render: function() {
return(
<h3>Hello JavaTpoint</h3>
);
}
});
// ES6
class MyComponent extends React.Component {
render() {
return(
<h3>Hello Javatpoint</h3>
);
}
}
π4
4. props
// ES5
var App = React.createClass({
propTypes: { name: React.PropTypes.string },
render: function() {
return(
<h3>Hello, {this.props.name}!</h3>
);
}
});
// ES6
class App extends React.Component {
render() {
return(
<h3>Hello, {this.props.name}!</h3>
);
}
}
β€5
π° Objects as Structs in JavaScript
This flexibility allows for a wide range of programming styles, including object-oriented programming.
While JavaScript does not have a direct equivalent to structs, its objects can be used in similar ways to group related data and behavior.
This flexibility allows for a wide range of programming styles, including object-oriented programming.
π5β€2π₯2