Difference Between Swift and Objective-C

Nitin Aggarwal
Updated on 22-Nov-2022 10:25:07

3K+ Views

In this tutorial, you are going to understand the difference between Swift and Objective-C languages. Both languages are used for Apple development but they are different from each other, let’s understand. How does Swift differ from Objective-C? Swift is overtaking Objective-C to become the most popular language for the Apple platform. Even Apple is updating Objective-C as well. Header Files The Objective-C language is based on C, but includes OOP concepts within it. In order to use the public functions and properties of any framework, we had to import header files. Swift does away ... Read More

Set Width of Bottom Border with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:46:37

358 Views

In this tutorial, we shall learn to set the width of the bottom border with JavaScript. To set the width of the bottom border, we can use the borderBottomWidth property in JavaScript. It allows you to change the width. Let us discuss our topic in brief. Using the borderBottomWidth Property With this property, we can set or return the width of an element's bottom border. Width is a floating point number with either a relative units designator (cm, mm, in, pt, or pc) or an absolute units designator (em, ex, or px). Syntax Following is the syntax to set the ... Read More

Set Top Position of an Element with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:40:45

14K+ Views

In this tutorial, we shall learn to set the top position of an element with JavaScript. To set the top position of an element, we can use the DOM Style top property in JavaScript. Alternatively, we can use the DOM Style setProperty() method. Let us discuss our topic in brief. Using the Style top Property We can set or return the top position of an element using the JavaScript DOM style top property. Following is the syntax to set the top position of an element using the Style top property with the dot notation or square brackets. Syntax object.style.top = ... Read More

Set Line Style in Text Decoration with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:37:42

1K+ Views

In this tutorial, we shall learn to set the style of the line in a text decoration with JavaScript. To set the style of the line in JavaScript, use the textDecorationStyle property. You can set underline, double, or overline, etc. for the line style. Let us discuss our topic in brief. Using the Style textDecorationStyle Property We can set or return the line style in a text decoration with this property. The major browsers support this property. Firefox adds support with an alternate property named MozTextDecorationStyle. Syntax Following is the syntax to set the style of the line in ... Read More

Set Style of Left Border with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:33:53

296 Views

In this tutorial, we shall learn how to set the style of the left border with JavaScript. To set the style of the left border in JavaScript, use the borderLeftStyle property. Set the style under this property that you want for the border i.e. solid, dashed, etc. Let us discuss our topic in brief. Using the borderLeftStyl Property With this property, we can set or return the style of the left border of an element. Users can follow the syntax below for using this property. Syntax object.style.borderLeftStyle = style; This syntax allows the required border style to be ... Read More

Access Methods of an Array of Objects in JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:30:15

2K+ Views

In this tutorial, we shall learn to access the methods of an array of objects in JavaScript. What is an array of objects? An array of objects can store several values in a single variable. Every value has an array index. The values can be objects, booleans, functions, numbers, strings, or another array. Arrays are extremely flexible because they are listed as objects. Therefore, we can access it easily. An array of objects has a lot of built-in methods. Some are concat, forEach, join, indexOf, splice, sort, slice, lastIndexOf, filter, map, pop, shift, push, unshift, reverse, find, reduce, isArray, length, ... Read More

Set Spacing Between Words in Text Using JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:26:09

5K+ Views

In this article, we will learn how to set the spacing between words in a text in JavaScript. Word spacing is critical on websites because it improves the legibility and readability of the text displayed on the page. You can generate an aesthetically pleasing and easyto-read typeface using proper word spacing. In JavaScript, we use the wordSpacing Property to set the spacing between the words in a text displayed on a website. Using the Style wordSpacing Property This JavaScript DOM property is used to get and set the spacing between the words in a text Depending on your needs, ... Read More

Set Size of Background Image with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:23:00

6K+ Views

In this tutorial, we will look at the method to set the size of a background image with JavaScript. Background effects on a webpage enhance its look. We can set a background color or a background image to enhance the feel of the webpage. We can also change the background properties, like its size or color. To enhance the feel, the image must fit in the right position with the right size. Generally, we do this by using CSS, but JavaScript DOM also provides properties to do so. So, let us look at how to set the size of the ... Read More

Set Right Padding of an Element with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:19:15

1K+ Views

In this tutorial, we will learn how to set the right padding of an element with JavaScript. First, let's try to understand what padding means; padding is simply an extra space between a page's border and our content. The gap between them increases as the value of padding increases. Padding is similar to the margin; padding is distinct from the margin because padding adds space between the border and content, whereas margin is used to add space around the edge. While padding can be done on all sides, i.e., Top, Bottom, Left, and Right in the following lines, we will ... Read More

Set Positioning Area of Background Image with JavaScript

Shubham Vora
Updated on 22-Nov-2022 07:07:33

454 Views

In this tutorial, we will learn how to set the positioning area of the background image using JavaScript The background image’s positioning area in a program can be changed using the HTML DOM Style background-origin property. Background-origin is a feature that allows you to modify the background images of a webpage. The origin of the picture in the background is set using this property. The background image origin is set to the upper-left corner of the screen/webpage by default. The background-origin property specifies the origin of the background: from the border start, within the border, or the padding. When the ... Read More

Advertisements